xref: /template/sprintdoc/tpl/nav-meta-box.php (revision 038d4bfe8d10e79235383d279d00a4b25ecced03)
192c91ef8SJana Deutschländer<?php
292c91ef8SJana Deutschländerif(!defined('DOKU_INC')) die();
3*038d4bfeSAndreas Gohrglobal $lang;
4*038d4bfeSAndreas Gohr
5*038d4bfeSAndreas Gohr$tabs = array();
6*038d4bfeSAndreas Gohr
7*038d4bfeSAndreas Gohr$toc = tpl_toc(true);
8*038d4bfeSAndreas Gohrif($toc) {
9*038d4bfeSAndreas Gohr    $tabs[] = array(
10*038d4bfeSAndreas Gohr        'id' => 'spr__tab-toc',
11*038d4bfeSAndreas Gohr        'label' => $lang['toc'],
12*038d4bfeSAndreas Gohr        'tab' => $toc,
13*038d4bfeSAndreas Gohr        'count' => null,
14*038d4bfeSAndreas Gohr    );
15*038d4bfeSAndreas Gohr}
16*038d4bfeSAndreas Gohr
17*038d4bfeSAndreas Gohr/** @var helper_plugin_tagging $tags */
18*038d4bfeSAndreas Gohr$tags = plugin_load('helper', 'tagging');
19*038d4bfeSAndreas Gohrif($tags) {
20*038d4bfeSAndreas Gohr    $tabs[] = array(
21*038d4bfeSAndreas Gohr        'id' => 'spr__tab-tags',
22*038d4bfeSAndreas Gohr        'label' => tpl_getLang('tab_tags'),
23*038d4bfeSAndreas Gohr        'tab' => $tags->tpl_tags(false),
24*038d4bfeSAndreas Gohr        'count' => null, // FIXME
25*038d4bfeSAndreas Gohr    );
26*038d4bfeSAndreas Gohr}
27*038d4bfeSAndreas Gohr
28*038d4bfeSAndreas Gohr// fixme add magicmatcher info
2992c91ef8SJana Deutschländer
3092c91ef8SJana Deutschländer?>
31d62df8bdSJana Deutschländer<div class="tab-container">
32d62df8bdSJana Deutschländer    <ul class="meta-tabs">
33*038d4bfeSAndreas Gohr        <?php
34*038d4bfeSAndreas Gohr        foreach($tabs as $tab) {
35*038d4bfeSAndreas Gohr            echo '<li>';
36*038d4bfeSAndreas Gohr            echo '<a href="#' . $tab['id'] . '" aria-expanded="false">';
37*038d4bfeSAndreas Gohr            echo '<span class="prefix">';
38*038d4bfeSAndreas Gohr            echo $tab['label'];
39*038d4bfeSAndreas Gohr            if($tab['count'] !== null) {
40*038d4bfeSAndreas Gohr                echo ' <span class="num">' . $tab['count'] . '</span>';
41*038d4bfeSAndreas Gohr            }
42*038d4bfeSAndreas Gohr            echo '</span>';
43*038d4bfeSAndreas Gohr            echo '</li>';
44*038d4bfeSAndreas Gohr        }
45*038d4bfeSAndreas Gohr        ?>
4638297711SJana Deutschländer    </ul>
4738297711SJana Deutschländer
48d62df8bdSJana Deutschländer    <div class="meta-content">
49d62df8bdSJana Deutschländer        <div class="box-content">
501b899691SJana Deutschländer            <?php
51*038d4bfeSAndreas Gohr            foreach($tabs as $tab) {
52*038d4bfeSAndreas Gohr                echo '<div id="' . $tab['id'] . '" class="tab-pane" aria-hidden="true">';
53*038d4bfeSAndreas Gohr                echo $tab['tab'];
54*038d4bfeSAndreas Gohr                echo '</div>';
551b899691SJana Deutschländer            }
561b899691SJana Deutschländer            ?>
571b899691SJana Deutschländer        </div>
581b899691SJana Deutschländer    </div>
5938297711SJana Deutschländer</div>
60