smart show/hide of sidebar if it has content

This commit is contained in:
Oliver Gorwits
2012-02-01 22:18:02 +00:00
parent cf1dd009ba
commit fe1f1fa2fd
3 changed files with 31 additions and 1 deletions

View File

@@ -14,7 +14,13 @@
<div class="tab-content">
[% FOREACH tab IN vars.tabs %]
<div id="[% tab.id %]_search" class="tab-pane [% 'active' IF params.tab == tab.id %]">
[%+ TRY %][% INCLUDE "sidebar/device/${tab.id}.tt" %][% CATCH %]<!-- no "[% tab.id %]" search options -->[% END %]
[% TRY %]
[% INCLUDE "sidebar/device/${tab.id}.tt" %]
<script type="text/javascript">has_sidebar["[% tab.id %]"] = 1;</script>
[% CATCH %]
<!-- no "[% tab.id %]" search options -->
<script type="text/javascript">has_sidebar["[% tab.id %]"] = 0;</script>
[% END %]
</div> <!-- /tab-pane -->
[% END %]
</div> <!-- /tab-content -->