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