xref: /template/sprintdoc/tpl/nav-meta-box.php (revision 038d4bfe8d10e79235383d279d00a4b25ecced03)
1<?php
2if(!defined('DOKU_INC')) die();
3global $lang;
4
5$tabs = array();
6
7$toc = tpl_toc(true);
8if($toc) {
9    $tabs[] = array(
10        'id' => 'spr__tab-toc',
11        'label' => $lang['toc'],
12        'tab' => $toc,
13        'count' => null,
14    );
15}
16
17/** @var helper_plugin_tagging $tags */
18$tags = plugin_load('helper', 'tagging');
19if($tags) {
20    $tabs[] = array(
21        'id' => 'spr__tab-tags',
22        'label' => tpl_getLang('tab_tags'),
23        'tab' => $tags->tpl_tags(false),
24        'count' => null, // FIXME
25    );
26}
27
28// fixme add magicmatcher info
29
30?>
31<div class="tab-container">
32    <ul class="meta-tabs">
33        <?php
34        foreach($tabs as $tab) {
35            echo '<li>';
36            echo '<a href="#' . $tab['id'] . '" aria-expanded="false">';
37            echo '<span class="prefix">';
38            echo $tab['label'];
39            if($tab['count'] !== null) {
40                echo ' <span class="num">' . $tab['count'] . '</span>';
41            }
42            echo '</span>';
43            echo '</li>';
44        }
45        ?>
46    </ul>
47
48    <div class="meta-content">
49        <div class="box-content">
50            <?php
51            foreach($tabs as $tab) {
52                echo '<div id="' . $tab['id'] . '" class="tab-pane" aria-hidden="true">';
53                echo $tab['tab'];
54                echo '</div>';
55            }
56            ?>
57        </div>
58    </div>
59</div>
60