Bug 13618: Add html filters to all the variables
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / columns_settings.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% SET footerjs = 1 %]
4 [% SET panel_id = 0 %]
5 [% BLOCK pagelist %]
6 <div class="pagelist">
7   <form method="post" action="/cgi-bin/koha/admin/columns_settings.pl">
8     <input type="hidden" name="action" value="save" />
9     <input type="hidden" name="module" value="[% modulename | html %]" />
10     <input type="hidden" name="panel" value="[% panel_id | html %]" />
11     [% SET panel_id = panel_id + 1 %]
12     [% IF module.keys and module.keys.size > 0 %]
13       [% FOR pagename IN module.keys %]
14         <h5>[% pagename | html %]</h5>
15         [% SET tables = module %]
16         [% IF tables.$pagename.keys and tables.$pagename.keys.size > 0 %]
17           [% FOR tablename IN tables.$pagename.keys.sort %]
18             [% IF pagename == 'additem' AND tablename == 'itemst' %]
19               <div class="alert">Changes made below will only apply to item subfields that are mapped to the 'items' table. <a href="/cgi-bin/koha/admin/koha2marclinks.pl?tablename=items">Go to Koha to MARC mapping</a></div>
20             [% END %]
21             <table>
22               <caption>
23                 [% IF tablename == 'currencies-table' %]
24                   Currency
25                 [% ELSIF pagename == 'additem' AND tablename == 'itemst' %]
26                   Items Editor
27                 [% END %]
28                 (id=[% tablename | html %])
29               </caption>
30               <thead><tr><th>Column name</th><th>Is hidden by default</th><th>Cannot be toggled</th></tr></thead>
31               <tbody>
32               [% FOR column IN tables.$pagename.$tablename %]
33                 [% SET value = pagename _ '#' _ tablename _ '#' _ column.columnname %]
34                 <tr>
35                   <td>
36                     [% column.columnname | html %]
37                     <input type="hidden" name="columnid" value="[% value | html %]" />
38                   </td>
39                   <td>
40                     [% IF column.is_hidden %]
41                       [% IF column.cannot_be_modified %]
42                         <input type="checkbox" name="[% value | html %]_hidden" value="1" checked="checked" disabled="disabled" />
43                         <input type="hidden" name="[% value | html %]_hidden" value="1" />
44                       [% ELSE %]
45                         <input type="checkbox" name="[% value | html %]_hidden" value="1" checked="checked" />
46                       [% END %]
47                     [% ELSE %]
48                       [% IF column.cannot_be_modified %]
49                         <input type="checkbox" name="[% value | html %]_hidden" value="1" disabled="disabled" />
50                         <input type="hidden" name="[% value | html %]_hidden" value="0" />
51                       [% ELSE %]
52                         <input type="checkbox" name="[% value | html %]_hidden" value="1" />
53                       [% END %]
54                     [% END %]
55                   </td>
56                   <td>
57                     [% IF column.cannot_be_toggled %]
58                       [% IF column.cannot_be_modified %]
59                         <input type="checkbox" name="[% value | html %]_cannot_be_toggled" value="1" checked="checked" disabled="disabled" />
60                         <input type="hidden" name="[% value | html %]_cannot_be_toggled" value="1" />
61                       [% ELSE %]
62                         <input type="checkbox" name="[% value | html %]_cannot_be_toggled" value="1" checked="checked" />
63                       [% END %]
64                     [% ELSE %]
65                       [% IF column.cannot_be_modified %]
66                         <input type="checkbox" name="[% value | html %]_cannot_be_toggled" value="1" disabled="disabled" />
67                         <input type="hidden" name="[% value | html %]_cannot_be_toggled" value="0" />
68                       [% ELSE %]
69                         <input type="checkbox" name="[% value | html %]_cannot_be_toggled" value="1" />
70                       [% END %]
71                     [% END %]
72                   </td>
73                 </tr>
74               [% END %]
75               </tbody>
76             </table>
77           [% END %]
78           <input type="submit" value="Save" />
79         [% ELSE %]
80           There is no table to configure for this module.
81         [% END %]
82       [% END %]
83     [% ELSE %]
84         There is no page using the table configuration in this module.
85     [% END %]
86   </form>
87 </div>
88 [% END %]
89
90 [% INCLUDE 'doc-head-open.inc' %]
91 <title>Koha &rsaquo; Administration &rsaquo; Columns settings</title>
92 [% INCLUDE 'doc-head-close.inc' %]
93 </head>
94
95 <body id="admin_tables" class="admin">
96 [% INCLUDE 'header.inc' %]
97 [% INCLUDE 'prefs-admin-search.inc' %]
98 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; Columns settings</div>
99
100 <div id="doc3" class="yui-t2">
101   <div id="bd">
102     <div id="yui-main">
103       <div class="yui-b">
104         <h2>Columns settings</h2>
105         <div id="modules">
106           <h3><a href="#acqui">Acquisition</a></h3>
107           <div id="acqui">
108             <h4>Acquisition tables</h4>
109             [% PROCESS pagelist module=modules.acqui modulename="acqui" %]
110           </div>
111
112           <h3><a href="#admin">Administration</a></h3>
113           <div id="admin">
114             <h4>Administration tables</h4>
115             [% PROCESS pagelist module=modules.admin modulename="admin" %]
116           </div>
117
118           <h3><a href="#authorities">Authorities</a></h3>
119           <div id="authorities">
120             <h4>Authorities tables</h4>
121             [% PROCESS pagelist module=modules.authorities modulename="authorities" %]
122           </div>
123
124           <h3><a href="#catalog">Catalog</a></h3>
125           <div id="catalogue">
126             <h4>Catalogue tables</h4>
127             [% PROCESS pagelist module=modules.catalogue modulename="catalogue" %]
128           </div>
129
130           <h3><a href="#cataloguing">Cataloging</a></h3>
131           <div id="cataloguing">
132             <h4>Cataloguing tables</h4>
133             [% PROCESS pagelist module=modules.cataloguing modulename="cataloguing" %]
134           </div>
135
136           <h3><a href="#circulation">Circulation</a></h3>
137           <div id="circulation">
138             <h4>Circulation tables</h4>
139             [% PROCESS pagelist module=modules.circ modulename="circ" %]
140           </div>
141
142           <h3><a href="#members">Patrons</a></h3>
143           <div id="members">
144             <h4>Patrons tables</h4>
145             [% PROCESS pagelist module=modules.members modulename="members" %]
146           </div>
147
148           <h3><a href="#opac">OPAC</a></h3>
149           <div id="opac">
150             <h4>OPAC tables</h4>
151             [% PROCESS pagelist module=modules.opac modulename="opac" %]
152           </div>
153
154           <h3><a href="#reports">Reports</a></h3>
155           <div id="reports">
156             <h4>Reports tables</h4>
157             [% PROCESS pagelist module=modules.reports modulename="reports" %]
158           </div>
159
160         </div>
161       </div>
162     </div>
163
164     <div class="yui-b">
165       [% INCLUDE 'admin-menu.inc' %]
166     </div>
167   </div>
168
169 [% MACRO jsinclude BLOCK %]
170     [% Asset.js("js/admin-menu.js") | $raw %]
171     <script type="text/javascript">
172         $(document).ready( function() {
173             var accordion = $( "#modules" ).accordion({
174                 collapsible: true,
175                 autoHeight: false,
176                 header: "h3",
177               [%- IF panel -%]
178                 [%# we were asked to show a specific panel, usually on update %]
179                 active: [%- panel | html -%]
180               [%- ELSE -%]
181                 active: false
182               [%- END -%]
183             });
184         });
185     </script>
186 [% END %]
187 [% INCLUDE 'intranet-bottom.inc' %]