xref: /template/sprintdoc/tpl/nav-meta-box.php (revision be2c36453805722df3aac8f7d14bfb5b7386e849)
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 '</a>';
44            echo '</li>';
45        }
46        ?>
47    </ul>
48
49    <div class="meta-content">
50        <div class="box-content">
51            <?php
52            foreach($tabs as $tab) {
53                echo '<div id="' . $tab['id'] . '" class="tab-pane" aria-hidden="true">';
54                echo $tab['tab'];
55                echo '</div>';
56            }
57            ?>
58        </div>
59    </div>
60</div>
61