dokuwiki-template-sprintdoc.../tpl/nav-meta-box.php
Andreas Gohr 2387fd467e moved tab logic to a new class
More of the logic should be moved to this class
2017-02-15 17:05:00 +01:00

36 lines
972 B
PHP
Executable file

<?php
if(!defined('DOKU_INC')) die();
$tabs = \dokuwiki\template\sprintdoc\Template::getInstance()->getMetaBoxTabs();
?>
<div class="tab-container">
<ul class="meta-tabs">
<?php
foreach($tabs as $tab) {
echo '<li>';
echo '<a href="#' . $tab['id'] . '" aria-expanded="false">';
echo '<span class="prefix">';
echo $tab['label'];
if($tab['count'] !== null) {
echo ' <span class="num">' . $tab['count'] . '</span>';
}
echo '</span>';
echo '</a>';
echo '</li>';
}
?>
</ul>
<div class="meta-content">
<div class="box-content">
<?php
foreach($tabs as $tab) {
echo '<div id="' . $tab['id'] . '" class="tab-pane" aria-hidden="true">';
echo $tab['tab'];
echo '</div>';
}
?>
</div>
</div>
</div>