You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- when calling checkall and cols blocks, take care when changing the
prefix. template toolkit does not have scoping when calling other
template blocks. the code was appending 'host' and 'service' twice and
not deleting it. select / deslect all buttons did not work properly
- stop removing the prefix from the permanent link. it was causing
problems in the combined export, where some inputs had to be prefixed
with 'host' and other had to be prefixed with 'service'
- when determining selected host/service columns prefixes correctly, and
set extra_hst/service_columns using grep. Previous regex was
converting the array to a string representation. It was not looking
for 'contacts' string inside the array? I am unsure.
Copy file name to clipboardExpand all lines: templates/_excel_export.tt
+25-14Lines changed: 25 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -1,39 +1,46 @@
1
-
[%# Variables for this template %]
2
-
[%# prefix:
3
-
Used as a prefix for the <input> IDs in the form. Make sure its unique on the rendered page, otherwise the (de)selectAll function does not work properly due to collisions with other inputs.
1
+
[%# This template is used to open up a popup menu and select columns for excel export. %]
2
+
3
+
[%# Variables %]
4
+
[%# prefix: Used as a prefix for the <input> IDs in the form. Make sure its unique on the rendered page, otherwise the (de)selectAll function does not work properly due to collisions with other inputs.
4
5
%]
6
+
<!-- _excel_export.tt | prefix value is: [% prefix %]' -->
7
+
8
+
5
9
[% BLOCK cols %]
10
+
<!-- _excel_export.tt BLOCK cols | prefix value is: '[% prefix %]' -->
11
+
<!-- _excel_export.tt BLOCK cols | columns value is: [[% columns.join(',') %]] -->
6
12
<table class="sortable_col_table rowhover">
7
13
[%- counter = 0 -%]
8
14
[%- FOR column IN columns -%]
9
15
[%- counter = counter + 1 -%]
10
16
[%- meta = column.split(':'); column = meta.0 -%]
11
17
[%- IF meta.size == 1; meta.1 = 1; END %]
12
18
<tr class="sortable_row">
13
-
<td class="px-2 py-0.5"><input type="checkbox" value="[% column | html %]" id="[% prefix %]ht[% counter %]" name="[% prefix %]columns" onclick=" updateExcelPermanentLink('[% prefix %]');"[% IF meta.1 == 1 %] checked[% END %]></td>
0 commit comments