Plugins can have CSS and Javascript loaded within <head>

This commit is contained in:
Oliver Gorwits
2013-06-02 12:48:06 +01:00
parent ed1bfa1ae7
commit 66b3ced179
13 changed files with 99 additions and 21 deletions

View File

@@ -32,7 +32,7 @@
[% NEXT UNLESS config.position == 'left' AND params.${config.name} %]
<td>
[% TRY %]
[% INCLUDE "plugin/device_port_column/${config.name}.tt" %]
[% INCLUDE "plugin/${config.name}/device_port_column.tt" %]
[% CATCH %]
<!-- dummy content required by Template Toolkit TRY -->
[% END %]
@@ -43,13 +43,13 @@
[% IF vars.user.port_control AND params.c_admin %]
[% IF row.up_admin == 'up' %]
<td nowrap class="nd_editable-cell" data-action="down"
data-field="c_port" data-for-device="[% device | html_entity %]" data-for-port="[% row.port | html_entity %]">
data-field="c_port" data-for-device="[% device.ip | html_entity %]" data-for-port="[% row.port | html_entity %]">
<i class="icon-hand-down nd_hand-icon"
rel="tooltip" data-placement="top" data-offset="3"
data-animation="" data-title="Click to Disable"></i>
[% ELSE %]
<td nowrap class="nd_editable-cell" data-action="up"
data-field="c_port" data-for-device="[% device | html_entity %]" data-for-port="[% row.port | html_entity %]">
data-field="c_port" data-for-device="[% device.ip | html_entity %]" data-for-port="[% row.port | html_entity %]">
<i class="icon-hand-up nd_hand-icon"
rel="tooltip" data-placement="top" data-offset="3"
data-animation="" data-title="Click to Enable"></i>
@@ -66,13 +66,9 @@
[% FOREACH config IN settings._extra_device_port_cols %]
[% NEXT UNLESS config.position == 'mid' AND params.${config.name} %]
<td>
[% TRY %]
[% INCLUDE "plugin/device_port_column/${config.name}.tt" %]
[% CATCH %]
<!-- dummy content required by Template Toolkit TRY -->
[% END %]
[% INCLUDE "plugin/${config.name}/device_port_column.tt" %]
</td>
[% END %]
[% END -%]
[% IF params.c_descr %]
<td nowrap>[% row.descr | html_entity %]</td>
@@ -97,7 +93,7 @@
[% IF params.c_name %]
[% IF vars.user.port_control AND params.c_admin %]
<td nowrap class="nd_editable-cell" contenteditable="true"
data-field="c_name" data-for-device="[% device | html_entity %]" data-for-port="[% row.port | html_entity %]">
data-field="c_name" data-for-device="[% device.ip | html_entity %]" data-for-port="[% row.port | html_entity %]">
<i class="icon-edit nd_edit-icon"></i>
[% ELSE %]
<td nowrap>
@@ -123,7 +119,7 @@
[% IF params.c_vlan %]
[% IF vars.user.port_control AND params.c_admin %]
<td class="nd_editable-cell" contenteditable="true"
data-field="c_vlan" data-for-device="[% device | html_entity %]" data-for-port="[% row.port | html_entity %]">
data-field="c_vlan" data-for-device="[% device.ip | html_entity %]" data-for-port="[% row.port | html_entity %]">
<i class="icon-edit nd_edit-icon"></i>
<div class="nd_editable-cell-content">
[% IF row.vlan %][% row.vlan | html_entity %][% END %]
@@ -164,7 +160,7 @@
[% IF row.power.admin == 'true' %]
[% IF vars.user.port_control AND params.c_admin %]
<td nowrap data-action="false"
data-field="c_power" data-for-device="[% device | html_entity %]"
data-field="c_power" data-for-device="[% device.ip | html_entity %]"
data-for-port="[% row.port | html_entity %]">
<i class="icon-off nd_power-icon nd_power-on"
@@ -184,7 +180,7 @@
[% ELSE %]
[% IF vars.user.port_control AND params.c_admin %]
<td nowrap data-action="true"
data-field="c_power" data-for-device="[% device | html_entity %]"
data-field="c_power" data-for-device="[% device.ip | html_entity %]"
data-for-port="[% row.port | html_entity %]">
<i class="icon-off nd_power-icon"
@@ -256,7 +252,7 @@
[% NEXT UNLESS config.position == 'right' AND params.${config.name} %]
<td>
[% TRY %]
[% INCLUDE "plugin/device_port_column/${config.name}.tt" %]
[% INCLUDE "plugin/${config.name}/device_port_column.tt" %]
[% CATCH %]
<!-- dummy content required by Template Toolkit TRY -->
[% END %]