Bug 21783: Reindent admin/columns_settings.tt
[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>
31                                     <tr>
32                                         <th>Column name</th>
33                                         <th>Is hidden by default</th>
34                                         <th>Cannot be toggled</th>
35                                     </tr>
36                                 </thead>
37                                 <tbody>
38                                     [% FOR column IN tables.$pagename.$tablename %]
39                                         [% SET value = pagename _ '#' _ tablename _ '#' _ column.columnname %]
40                                         <tr>
41                                             <td>
42                                                 [% column.columnname | html %]
43                                                 <input type="hidden" name="columnid" value="[% value | html %]" />
44                                             </td>
45                                             <td>
46                                                 [% IF column.is_hidden %]
47                                                     [% IF column.cannot_be_modified %]
48                                                         <input type="checkbox" name="[% value | html %]_hidden" value="1" checked="checked" disabled="disabled" />
49                                                         <input type="hidden" name="[% value | html %]_hidden" value="1" />
50                                                     [% ELSE %]
51                                                         <input type="checkbox" name="[% value | html %]_hidden" value="1" checked="checked" />
52                                                     [% END %]
53                                                 [% ELSE %]
54                                                     [% IF column.cannot_be_modified %]
55                                                         <input type="checkbox" name="[% value | html %]_hidden" value="1" disabled="disabled" />
56                                                         <input type="hidden" name="[% value | html %]_hidden" value="0" />
57                                                     [% ELSE %]
58                                                         <input type="checkbox" name="[% value | html %]_hidden" value="1" />
59                                                     [% END %]
60                                                 [% END %]
61                                             </td>
62                                             <td>
63                                                 [% IF column.cannot_be_toggled %]
64                                                     [% IF column.cannot_be_modified %]
65                                                         <input type="checkbox" name="[% value | html %]_cannot_be_toggled" value="1" checked="checked" disabled="disabled" />
66                                                         <input type="hidden" name="[% value | html %]_cannot_be_toggled" value="1" />
67                                                     [% ELSE %]
68                                                         <input type="checkbox" name="[% value | html %]_cannot_be_toggled" value="1" checked="checked" />
69                                                     [% END %]
70                                                 [% ELSE %]
71                                                     [% IF column.cannot_be_modified %]
72                                                         <input type="checkbox" name="[% value | html %]_cannot_be_toggled" value="1" disabled="disabled" />
73                                                         <input type="hidden" name="[% value | html %]_cannot_be_toggled" value="0" />
74                                                     [% ELSE %]
75                                                         <input type="checkbox" name="[% value | html %]_cannot_be_toggled" value="1" />
76                                                     [% END %]
77                                                 [% END %]
78                                             </td>
79                                         </tr>
80                                     [% END %]
81                                 </tbody>
82                             </table>
83                         [% END %]
84                         <input type="submit" value="Save" />
85                     [% ELSE %]
86                         There is no table to configure for this module.
87                     [% END %]
88                 [% END %]
89             [% ELSE %]
90                 There is no page using the table configuration in this module.
91             [% END %]
92         </form>
93     </div>
94 [% END %]
95
96 [% INCLUDE 'doc-head-open.inc' %]
97 <title>Koha &rsaquo; Administration &rsaquo; Columns settings</title>
98 [% INCLUDE 'doc-head-close.inc' %]
99 </head>
100
101 <body id="admin_tables" class="admin">
102
103     [% INCLUDE 'header.inc' %]
104     [% INCLUDE 'prefs-admin-search.inc' %]
105     <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>
106
107     <div class="main container-fluid">
108         <div class="row">
109                 <div class="col-sm-10 col-sm-push-2">
110                         <main>
111
112                             <h2>Columns settings</h2>
113                             <div id="modules">
114                                 <h3><a href="#acqui">Acquisition</a></h3>
115                                 <div id="acqui">
116                                     <h4>Acquisition tables</h4>
117                                     [% PROCESS pagelist module=modules.acqui modulename="acqui" %]
118                                 </div>
119
120                                 <h3><a href="#admin">Administration</a></h3>
121                                 <div id="admin">
122                                     <h4>Administration tables</h4>
123                                     [% PROCESS pagelist module=modules.admin modulename="admin" %]
124                                 </div>
125
126                                 <h3><a href="#authorities">Authorities</a></h3>
127                                 <div id="authorities">
128                                     <h4>Authorities tables</h4>
129                                     [% PROCESS pagelist module=modules.authorities modulename="authorities" %]
130                                 </div>
131
132                                 <h3><a href="#catalog">Catalog</a></h3>
133                                 <div id="catalogue">
134                                     <h4>Catalogue tables</h4>
135                                     [% PROCESS pagelist module=modules.catalogue modulename="catalogue" %]
136                                 </div>
137
138                                 <h3><a href="#cataloguing">Cataloging</a></h3>
139                                 <div id="cataloguing">
140                                     <h4>Cataloguing tables</h4>
141                                     [% PROCESS pagelist module=modules.cataloguing modulename="cataloguing" %]
142                                 </div>
143
144                                 <h3><a href="#circulation">Circulation</a></h3>
145                                 <div id="circulation">
146                                     <h4>Circulation tables</h4>
147                                     [% PROCESS pagelist module=modules.circ modulename="circ" %]
148                                 </div>
149
150                                 <h3><a href="#coursereserves">Course reserves</a></h3>
151                                 <div id="coursereserves">
152                                     <h4>Course reserves tables</h4>
153                                     [% PROCESS pagelist module=modules.coursereserves modulename="coursereserves" %]
154                                 </div>
155
156                                 <h3><a href="#ill">Interlibrary loans</a></h3>
157                                 <div id="ill">
158                                     <h4>Interlibrary loans tables</h4>
159                                     [% PROCESS pagelist module=modules.illrequests modulename="illrequests" %]
160                                 </div>
161
162                                 <h3><a href="#members">Patrons</a></h3>
163                                 <div id="members">
164                                     <h4>Patrons tables</h4>
165                                     [% PROCESS pagelist module=modules.members modulename="members" %]
166                                 </div>
167
168                                 <h3><a href="#tools">Tools</a></h3>
169                                 <div id="tools">
170                                     <h4>Tools tables</h4>
171                                     [% PROCESS pagelist module=modules.tools modulename="tools" %]
172                                 </div>
173
174                                 <h3><a href="#opac">OPAC</a></h3>
175                                 <div id="opac">
176                                     <h4>OPAC tables</h4>
177                                     [% PROCESS pagelist module=modules.opac modulename="opac" %]
178                                 </div>
179
180                                 <h3><a href="#reports">Reports</a></h3>
181                                 <div id="reports">
182                                     <h4>Reports tables</h4>
183                                     [% PROCESS pagelist module=modules.reports modulename="reports" %]
184                                 </div>
185
186                                 <h3><a href="#serials">Serials</a></h3>
187                                 <div id="serials">
188                                     <h4>Serials tables</h4>
189                                     [% PROCESS pagelist module=modules.serials modulename="serials" %]
190                                 </div>
191
192                             </div>
193                         </main>
194                 </div> <!-- /.col-sm-10.col-sm-push-2 -->
195
196                 <div class="col-sm-2 col-sm-pull-10">
197                         <aside>
198                                 [% INCLUDE 'admin-menu.inc' %]
199                         </aside>
200                 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
201         </div> <!-- /.row -->
202
203 [% MACRO jsinclude BLOCK %]
204     [% Asset.js("js/admin-menu.js") | $raw %]
205     <script>
206         $(document).ready( function() {
207             var accordion = $( "#modules" ).accordion({
208                     collapsible: true,
209                     autoHeight: false,
210                     header: "h3",
211                 [%- IF panel -%]
212                     [%# we were asked to show a specific panel, usually on update %]
213                     active: [%- panel | html -%]
214                 [%- ELSE -%]
215                     active: false
216                 [%- END -%]
217             });
218         });
219     </script>
220 [% END %]
221 [% INCLUDE 'intranet-bottom.inc' %]