e5f9df444b4c21fa0c89dad4b4f7bcbd685a4794
[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 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="#coursereserves">Course reserves</a></h3>
144           <div id="coursereserves">
145             <h4>Course reserves tables</h4>
146             [% PROCESS pagelist module=modules.coursereserves modulename="coursereserves" %]
147           </div>
148
149           <h3><a href="#ill">Interlibrary loans</a></h3>
150           <div id="ill">
151             <h4>Interlibrary loans tables</h4>
152             [% PROCESS pagelist module=modules.illrequests modulename="illrequests" %]
153           </div>
154
155           <h3><a href="#members">Patrons</a></h3>
156           <div id="members">
157             <h4>Patrons tables</h4>
158             [% PROCESS pagelist module=modules.members modulename="members" %]
159           </div>
160
161             <h3><a href="#tools">Tools</a></h3>
162             <div id="tools">
163                 <h4>Tools tables</h4>
164                 [% PROCESS pagelist module=modules.tools modulename="tools" %]
165             </div>
166
167           <h3><a href="#opac">OPAC</a></h3>
168           <div id="opac">
169             <h4>OPAC tables</h4>
170             [% PROCESS pagelist module=modules.opac modulename="opac" %]
171           </div>
172
173           <h3><a href="#reports">Reports</a></h3>
174           <div id="reports">
175             <h4>Reports tables</h4>
176             [% PROCESS pagelist module=modules.reports modulename="reports" %]
177           </div>
178
179           <h3><a href="#serials">Serials</a></h3>
180           <div id="serials">
181             <h4>Serials tables</h4>
182             [% PROCESS pagelist module=modules.serials modulename="serials" %]
183           </div>
184
185         </div>
186             </main>
187         </div> <!-- /.col-sm-10.col-sm-push-2 -->
188
189         <div class="col-sm-2 col-sm-pull-10">
190             <aside>
191                 [% INCLUDE 'admin-menu.inc' %]
192             </aside>
193         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
194      </div> <!-- /.row -->
195
196 [% MACRO jsinclude BLOCK %]
197     [% Asset.js("js/admin-menu.js") | $raw %]
198     <script>
199         $(document).ready( function() {
200             var accordion = $( "#modules" ).accordion({
201                 collapsible: true,
202                 autoHeight: false,
203                 header: "h3",
204               [%- IF panel -%]
205                 [%# we were asked to show a specific panel, usually on update %]
206                 active: [%- panel | html -%]
207               [%- ELSE -%]
208                 active: false
209               [%- END -%]
210             });
211         });
212     </script>
213 [% END %]
214 [% INCLUDE 'intranet-bottom.inc' %]