put colvis controls in sidebar [experimental]

This commit is contained in:
Oliver Gorwits
2014-08-18 22:09:31 +01:00
parent d44e9dacb4
commit 173ea3853d
3 changed files with 51 additions and 23 deletions

View File

@@ -56,26 +56,7 @@
<i class="nd_arrow-up-down-right icon-chevron-down icon-large"></i>
</label></span>
<div id="nd_columns" class="collapse in">
<ul class="nd_inputs-list unstyled">
[% FOREACH item IN vars.port_columns %]
[% NEXT IF item.name == 'c_admin' AND NOT user_has_role('port_control') %]
[% IF item.name == 'c_admin' OR item.name == 'c_nodes' %]
<li>
<label class="checkbox">
<input type="checkbox" id="[% item.name | html_entity %]"
name="[% item.name | html_entity %]"[% ' checked="checked"' IF params.${item.name} %] />
[% IF item.name == 'c_admin' %]
<span class="label label-info">[% item.label | html_entity %]</span>
[% ELSE %]
[% item.label | html_entity %]
[% END %]
</label>
</li>
[% ELSE %]
<input type="checkbox" id="[% item.name | html_entity %]"
name="[% item.name | html_entity %]"[% ' checked="checked"' IF params.${item.name} %] style="display:none;" />
[% END %]
[% END %]
<ul id="nd_column-controls" class="nd_inputs-list unstyled">
</ul>
</div>
</div>
@@ -147,6 +128,24 @@
</ul>
</div>
</div>
<ul class="nd_inputs-list unstyled">
[% FOREACH item IN vars.port_columns %]
[% NEXT IF item.name == 'c_admin' AND NOT user_has_role('port_control') %]
[% IF item.name == 'c_admin' OR item.name == 'c_nodes' %]
<li>
<label class="checkbox">
<input type="checkbox" id="[% item.name | html_entity %]"
name="[% item.name | html_entity %]"[% ' checked="checked"' IF params.${item.name} %] />
[% IF item.name == 'c_admin' %]
<span class="label label-info">[% item.label | html_entity %]</span>
[% ELSE %]
[% item.label | html_entity %]
[% END %]
</label>
</li>
[% END %]
[% END %]
</ul>
<div class="btn-group">
<button id="[% tab.tag %]_submit" type="submit" class="btn btn-info nd_sidebar-btn-drop">
<i class="icon-search icon-large pull-left nd_navbar-icon"></i> Update View</button>