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