db421ced84d1c161dfe3f2d73a396e6ffc9a176b
[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     [% IF module.keys and module.keys.size > 0 %]
7         Jump to:
8         [% FOR pagename IN module.keys %]
9             <a href="#[% pagename | url %]">[% pagename | html %]</a>
10             [% UNLESS loop.last %]<span class="separator"> | </span>[% END %]
11         [% END %]
12     [% END %]
13     <div class="pagelist">
14         <form method="post" action="/cgi-bin/koha/admin/columns_settings.pl">
15             <input type="hidden" name="action" value="save" />
16             <input type="hidden" name="module" value="[% modulename | html %]" />
17             <input type="hidden" name="panel" value="[% panel_id | html %]" />
18             [% SET panel_id = panel_id + 1 %]
19             [% IF module.keys and module.keys.size > 0 %]
20                 [% FOR pagename IN module.keys %]
21                     <h4 class="page_name" id="[% pagename | html %]">Page: [% pagename | html %]</h4>
22                     [% SET tables = module %]
23                     [% IF tables.$pagename.keys and tables.$pagename.keys.size > 0 %]
24                         [% FOR tablename IN tables.$pagename.keys.sort %]
25                             [% IF pagename == 'additem' AND tablename == 'itemst' %]
26                                 <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>
27                             [% END %]
28                             <table>
29                                 <caption>
30                                     [% IF tablename == 'currencies-table' %]
31                                         Currency
32                                     [% ELSIF pagename == 'additem' AND tablename == 'itemst' %]
33                                         Items Editor
34                                     [% ELSE %]
35                                         Table id: [% tablename | html %]
36                                     [% END %]
37                                 </caption>
38                                 <thead>
39                                     <tr>
40                                         <th>Column name</th>
41                                         <th>Is hidden by default</th>
42                                         <th>Cannot be toggled</th>
43                                     </tr>
44                                 </thead>
45                                 <tbody>
46                                     [% FOR column IN tables.$pagename.$tablename %]
47                                         [% SET value = pagename _ '#' _ tablename _ '#' _ column.columnname %]
48                                         <tr>
49                                             <td>
50                                                 [% column.columnname | html %]
51                                                 <input type="hidden" name="columnid" value="[% value | html %]" />
52                                             </td>
53                                             <td>
54                                                 [% IF column.is_hidden %]
55                                                     [% IF column.cannot_be_modified %]
56                                                         <input type="checkbox" name="[% value | html %]_hidden" value="1" checked="checked" disabled="disabled" />
57                                                         <input type="hidden" name="[% value | html %]_hidden" value="1" />
58                                                     [% ELSE %]
59                                                         <input type="checkbox" name="[% value | html %]_hidden" value="1" checked="checked" />
60                                                     [% END %]
61                                                 [% ELSE %]
62                                                     [% IF column.cannot_be_modified %]
63                                                         <input type="checkbox" name="[% value | html %]_hidden" value="1" disabled="disabled" />
64                                                         <input type="hidden" name="[% value | html %]_hidden" value="0" />
65                                                     [% ELSE %]
66                                                         <input type="checkbox" name="[% value | html %]_hidden" value="1" />
67                                                     [% END %]
68                                                 [% END %]
69                                             </td>
70                                             <td>
71                                                 [% IF column.cannot_be_toggled %]
72                                                     [% IF column.cannot_be_modified %]
73                                                         <input type="checkbox" name="[% value | html %]_cannot_be_toggled" value="1" checked="checked" disabled="disabled" />
74                                                         <input type="hidden" name="[% value | html %]_cannot_be_toggled" value="1" />
75                                                     [% ELSE %]
76                                                         <input type="checkbox" name="[% value | html %]_cannot_be_toggled" value="1" checked="checked" />
77                                                     [% END %]
78                                                 [% ELSE %]
79                                                     [% IF column.cannot_be_modified %]
80                                                         <input type="checkbox" name="[% value | html %]_cannot_be_toggled" value="1" disabled="disabled" />
81                                                         <input type="hidden" name="[% value | html %]_cannot_be_toggled" value="0" />
82                                                     [% ELSE %]
83                                                         <input type="checkbox" name="[% value | html %]_cannot_be_toggled" value="1" />
84                                                     [% END %]
85                                                 [% END %]
86                                             </td>
87                                         </tr>
88                                     [% END %]
89                                 </tbody>
90                             </table>
91                         [% END %]
92                         <fieldset class="action">
93                             <input type="submit" value="Save" />
94                         </fieldset>
95                     [% ELSE %]
96                         There is no table to configure for this module.
97                     [% END %]
98                 [% END %]
99             [% ELSE %]
100                 There is no page using the table configuration in this module.
101             [% END %]
102         </form>
103     </div>
104 [% END %]
105
106 [% INCLUDE 'doc-head-open.inc' %]
107 <title>Koha &rsaquo; Administration &rsaquo; Columns settings</title>
108 [% INCLUDE 'doc-head-close.inc' %]
109 <style>
110     caption {
111         font-size: 115%;
112     }
113     .page_name {
114         border-top: 1px solid #b9d8d9;
115         margin-top: 1em;
116         padding-top: 1em;
117     }
118 </style>
119 </head>
120
121 <body id="admin_tables" class="admin">
122
123     [% INCLUDE 'header.inc' %]
124     [% INCLUDE 'prefs-admin-search.inc' %]
125     <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>
126
127     <div class="main container-fluid">
128         <div class="row">
129                 <div class="col-sm-10 col-sm-push-2">
130                         <main>
131
132                             <h2>Columns settings</h2>
133                             <div id="modules">
134                                 <div class="panel_header"><a href="#acqui">Acquisition</a></div>
135                                 <div id="acqui">
136                                     <h3>Acquisition tables</h3>
137                                     [% PROCESS pagelist module=modules.acqui modulename="acqui" %]
138                                 </div>
139
140                                 <div class="panel_header"><a href="#admin">Administration</a></div>
141                                 <div id="admin">
142                                     <h3>Administration tables</h3>
143                                     [% PROCESS pagelist module=modules.admin modulename="admin" %]
144                                 </div>
145
146                                 <div class="panel_header"><a href="#authorities">Authorities</a></div>
147                                 <div id="authorities">
148                                     <h3>Authorities tables</h3>
149                                     [% PROCESS pagelist module=modules.authorities modulename="authorities" %]
150                                 </div>
151
152                                 <div class="panel_header"><a href="#catalog">Catalog</a></div>
153                                 <div id="catalogue">
154                                     <h3>Catalogue tables</h3>
155                                     [% PROCESS pagelist module=modules.catalogue modulename="catalogue" %]
156                                 </div>
157
158                                 <div class="panel_header"><a href="#cataloguing">Cataloging</a></div>
159                                 <div id="cataloguing">
160                                     <h3>Cataloguing tables</h3>
161                                     [% PROCESS pagelist module=modules.cataloguing modulename="cataloguing" %]
162                                 </div>
163
164                                 <div class="panel_header"><a href="#circulation">Circulation</a></div>
165                                 <div id="circulation">
166                                     <h3>Circulation tables</h3>
167                                     [% PROCESS pagelist module=modules.circ modulename="circ" %]
168                                 </div>
169
170                                 <div class="panel_header"><a href="#coursereserves">Course reserves</a></div>
171                                 <div id="coursereserves">
172                                     <h3>Course reserves tables</h3>
173                                     [% PROCESS pagelist module=modules.coursereserves modulename="coursereserves" %]
174                                 </div>
175
176                                 <div class="panel_header"><a href="#ill">Interlibrary loans</a></div>
177                                 <div id="ill">
178                                     <h3>Interlibrary loans tables</h3>
179                                     [% PROCESS pagelist module=modules.illrequests modulename="illrequests" %]
180                                 </div>
181
182                                 <div class="panel_header"><a href="#members">Patrons</a></div>
183                                 <div id="members">
184                                     <h3>Patrons tables</h3>
185                                     [% PROCESS pagelist module=modules.members modulename="members" %]
186                                 </div>
187
188                                 <div class="panel_header"><a href="#tools">Tools</a></div>
189                                 <div id="tools">
190                                     <h3>Tools tables</h3>
191                                     [% PROCESS pagelist module=modules.tools modulename="tools" %]
192                                 </div>
193
194                                 <div class="panel_header"><a href="#opac">OPAC</a></div>
195                                 <div id="opac">
196                                     <h3>OPAC tables</h3>
197                                     [% PROCESS pagelist module=modules.opac modulename="opac" %]
198                                 </div>
199
200                                 <div class="panel_header"><a href="#reports">Reports</a></div>
201                                 <div id="reports">
202                                     <h3>Reports tables</h3>
203                                     [% PROCESS pagelist module=modules.reports modulename="reports" %]
204                                 </div>
205
206                                 <div class="panel_header"><a href="#serials">Serials</a></div>
207                                 <div id="serials">
208                                     <h3>Serials tables</h3>
209                                     [% PROCESS pagelist module=modules.serials modulename="serials" %]
210                                 </div>
211
212                             </div>
213                         </main>
214                 </div> <!-- /.col-sm-10.col-sm-push-2 -->
215
216                 <div class="col-sm-2 col-sm-pull-10">
217                         <aside>
218                                 [% INCLUDE 'admin-menu.inc' %]
219                         </aside>
220                 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
221         </div> <!-- /.row -->
222
223 [% MACRO jsinclude BLOCK %]
224     [% Asset.js("js/admin-menu.js") | $raw %]
225     <script>
226         $(document).ready( function() {
227             var accordion = $( "#modules" ).accordion({
228                     collapsible: true,
229                     heightStyle: "content",
230                     header: ".panel_header",
231                 [%- IF panel -%]
232                     [%# we were asked to show a specific panel, usually on update %]
233                     active: [%- panel | html -%]
234                 [%- ELSE -%]
235                     active: false
236                 [%- END -%]
237             });
238         });
239     </script>
240 [% END %]
241 [% INCLUDE 'intranet-bottom.inc' %]