Bug 20739: Update two-column templates with Bootstrap grid, Administration part 3
[koha-equinox.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 class="main container-fluid">
101     <div class="row">
102         <div class="col-sm-10 col-sm-push-2">
103             <main>
104
105         <h2>Columns settings</h2>
106         <div id="modules">
107           <h3><a href="#acqui">Acquisition</a></h3>
108           <div id="acqui">
109             <h4>Acquisition tables</h4>
110             [% PROCESS pagelist module=modules.acqui modulename="acqui" %]
111           </div>
112
113           <h3><a href="#admin">Administration</a></h3>
114           <div id="admin">
115             <h4>Administration tables</h4>
116             [% PROCESS pagelist module=modules.admin modulename="admin" %]
117           </div>
118
119           <h3><a href="#authorities">Authorities</a></h3>
120           <div id="authorities">
121             <h4>Authorities tables</h4>
122             [% PROCESS pagelist module=modules.authorities modulename="authorities" %]
123           </div>
124
125           <h3><a href="#catalog">Catalog</a></h3>
126           <div id="catalogue">
127             <h4>Catalogue tables</h4>
128             [% PROCESS pagelist module=modules.catalogue modulename="catalogue" %]
129           </div>
130
131           <h3><a href="#cataloguing">Cataloging</a></h3>
132           <div id="cataloguing">
133             <h4>Cataloguing tables</h4>
134             [% PROCESS pagelist module=modules.cataloguing modulename="cataloguing" %]
135           </div>
136
137           <h3><a href="#circulation">Circulation</a></h3>
138           <div id="circulation">
139             <h4>Circulation tables</h4>
140             [% PROCESS pagelist module=modules.circ modulename="circ" %]
141           </div>
142
143           <h3><a href="#members">Patrons</a></h3>
144           <div id="members">
145             <h4>Patrons tables</h4>
146             [% PROCESS pagelist module=modules.members modulename="members" %]
147           </div>
148
149           <h3><a href="#opac">OPAC</a></h3>
150           <div id="opac">
151             <h4>OPAC tables</h4>
152             [% PROCESS pagelist module=modules.opac modulename="opac" %]
153           </div>
154
155           <h3><a href="#reports">Reports</a></h3>
156           <div id="reports">
157             <h4>Reports tables</h4>
158             [% PROCESS pagelist module=modules.reports modulename="reports" %]
159           </div>
160
161         </div>
162             </main>
163         </div> <!-- /.col-sm-10.col-sm-push-2 -->
164
165         <div class="col-sm-2 col-sm-pull-10">
166             <aside>
167                 [% INCLUDE 'admin-menu.inc' %]
168             </aside>
169         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
170      </div> <!-- /.row -->
171
172 [% MACRO jsinclude BLOCK %]
173     [% Asset.js("js/admin-menu.js") | $raw %]
174     <script>
175         $(document).ready( function() {
176             var accordion = $( "#modules" ).accordion({
177                 collapsible: true,
178                 autoHeight: false,
179                 header: "h3",
180               [%- IF panel -%]
181                 [%# we were asked to show a specific panel, usually on update %]
182                 active: [%- panel | html -%]
183               [%- ELSE -%]
184                 active: false
185               [%- END -%]
186             });
187         });
188     </script>
189 [% END %]
190 [% INCLUDE 'intranet-bottom.inc' %]