Merge branch 'fixMetaBoxEmptyTab' into 'master'
Do not show a meta-tab if the content is falsy See merge request !21
This commit is contained in:
commit
7f087684c3
1 changed files with 6 additions and 0 deletions
|
@ -9,6 +9,9 @@ $tabs = \dokuwiki\template\sprintdoc\Template::getInstance()->getMetaBoxTabs();
|
||||||
<li class="a11y"> </li>
|
<li class="a11y"> </li>
|
||||||
<?php
|
<?php
|
||||||
foreach($tabs as $tab) {
|
foreach($tabs as $tab) {
|
||||||
|
if (empty($tab['tab']) || trim($tab['tab']) === '') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
echo '<li>';
|
echo '<li>';
|
||||||
echo '<a href="#' . $tab['id'] . '" aria-expanded="false">';
|
echo '<a href="#' . $tab['id'] . '" aria-expanded="false">';
|
||||||
echo '<span class="prefix">';
|
echo '<span class="prefix">';
|
||||||
|
@ -27,6 +30,9 @@ $tabs = \dokuwiki\template\sprintdoc\Template::getInstance()->getMetaBoxTabs();
|
||||||
<div class="box-content">
|
<div class="box-content">
|
||||||
<?php
|
<?php
|
||||||
foreach($tabs as $tab) {
|
foreach($tabs as $tab) {
|
||||||
|
if (empty($tab['tab']) || trim($tab['tab']) === '') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
echo '<div id="' . $tab['id'] . '" class="tab-pane" aria-hidden="true">';
|
echo '<div id="' . $tab['id'] . '" class="tab-pane" aria-hidden="true">';
|
||||||
echo $tab['tab'];
|
echo $tab['tab'];
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue