Bug 27395: Add a warning to PatronSelfRegistrationDefaultCategory
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / auth_tag_structure.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE AuthorisedValues %]
4 [% SET footerjs = 1 %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha &rsaquo; Administration &rsaquo; Authority MARC framework [% IF ( add_form ) %][% IF ( use_heading_flags_p ) %]
7     [% IF ( heading_modify_tag_p ) %]&rsaquo; [% IF ( authtypecode ) %][% authtypecode | html %] Framework[% ELSE %]Default framework[% END %] &rsaquo; Modify tag[% END %]
8     [% IF ( heading_add_tag_p ) %]&rsaquo; [% IF ( authtypecode ) %][% authtypecode | html %] Framework[% ELSE %]Default framework[% END %] &rsaquo; New tag[% END %]
9     [% ELSE %]&rsaquo; [% action | html %][% END %][% END %][% IF ( delete_confirm ) %]&rsaquo; [% IF ( authtypecode ) %][% authtypecode | html %] Framework[% ELSE %]Default framework[% END %] &rsaquo; Confirm deletion[% END %][% IF ( delete_confirmed ) %]&rsaquo; [% IF ( authtypecode ) %][% authtypecode | html %] Framework[% ELSE %]Default framework[% END %] &rsaquo; Data deleted[% END %]</title>
10 [% INCLUDE 'doc-head-close.inc' %]
11
12 </head>
13
14 <body id="admin_auth_tag_structure" class="admin">
15 [% INCLUDE 'header.inc' %]
16 [% INCLUDE 'prefs-admin-search.inc' %]
17
18 <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;
19     <a href="/cgi-bin/koha/admin/authtypes.pl">Authority types</a> &rsaquo;
20     [% IF ( add_form ) %]
21         [% IF ( use_heading_flags_p ) %]
22             [% IF ( heading_modify_tag_p ) %]
23                 [% IF ( authtypecode ) %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode | uri %]">[% authtypecode | html %] Framework</a>
24                 [% ELSE %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl">Default framework</a>
25                 [% END %] &rsaquo; Modify tag
26             [% END %]
27             [% IF ( heading_add_tag_p ) %]
28                 [% IF ( authtypecode ) %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode | uri %]">[% authtypecode | html %] framework</a>
29                 [% ELSE %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl">Default framework</a>
30                 [% END %] &rsaquo; New tag
31             [% END %]
32         [% ELSE %]
33             [% IF ( authtypecode ) %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode | uri %]">[% authtypecode | html %] Framework</a>
34             [% ELSE %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl">Default framework</a>
35             [% END %] &rsaquo; [% action | html %]
36         [% END %]
37     [% ELSE %]
38         [% IF ( delete_confirm ) %]
39             [% IF ( authtypecode ) %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode | uri %]">[% authtypecode | html %] framework</a>
40             [% ELSE %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl">Default framework</a>
41             [% END %] &rsaquo; Confirm deletion
42         [% ELSE %]
43             [% IF ( delete_confirmed ) %]
44                 [% IF ( authtypecode ) %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode | uri %]">[% authtypecode | html %] framework</a>
45                 [% ELSE %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl">Default framework</a>
46                 [% END %] &rsaquo; Data deleted
47             [% ELSE %]
48                 [% IF ( authtypecode ) %][% authtypecode | html %] Framework
49                 [% ELSE %]Default framework
50                 [% END %]
51             [% END %]
52         [% END %]
53     [% END %]
54 </div>
55
56 <div class="main container-fluid">
57     <div class="row">
58         <div class="col-sm-10 col-sm-push-2">
59             <main>
60
61 <h1>Authority MARC framework for [% IF ( authtypecode ) %][% authtypecode | html %][% ELSE %]default framework[% END %]</h1>
62
63
64 [% IF ( add_form ) %]
65
66     <h2>
67     [% IF ( heading_modify_tag_p ) %]Modify tag[% END %]
68     [% IF ( heading_add_tag_p ) %]New tag[% END %]
69     </h2>
70     <form action="[% script_name | html %]" name="Aform" method="post" class="validated">
71         <input type="hidden" name="op" value="add_validate" />
72         [% IF ( heading_modify_tag_p ) %]<input type="hidden" name="modif" value="1" />[% END %]
73         <input type="hidden" name="authtypecode" value="[% authtypecode | html %]" />
74         <fieldset class="rows">
75             <ol>
76                 [% IF ( heading_modify_tag_p ) %]
77                     <li>
78                         <span class="label">Tag: </span>
79                         <input type="hidden" name="tagfield" value="[% searchfield | html %]" />
80                         [% searchfield | html %]
81                     </li>
82                 [% ELSE %]
83                     <li>
84                         <label for="tagfield" class="required">Tag: </label><input type="text" id="tagfield" name="tagfield" size="5" maxlength="3" required="required" class="required" />
85                         <span class="required">Required</span>
86                     </li>
87                 [% END %]
88
89         <li><label for="liblibrarian">Text for librarians: </label><input type="text" name="liblibrarian" id="liblibrarian" value="[% liblibrarian | html %]" size="40" maxlength="100" /></li>
90         <li><label for="libopac">Text for opac: </label><input type="text" name="libopac" id="libopac" value="[% libopac | html %]" size="40" maxlength="100" /></li>
91         <li><label for="repeatable">Repeatable: </label>
92             [% IF ( repeatable ) %]
93                 <input type="checkbox" name="repeatable" id="repeatable" value="1" checked="checked" />
94             [% ELSE %]
95                 <input type="checkbox" name="repeatable" id="repeatable" value="1" />
96             [% END %]
97         </li>
98         <li><label for="mandatory">Mandatory: </label>
99             [% IF ( mandatory ) %]
100                 <input type="checkbox" name="mandatory" id="mandatory" value="1" checked="checked" />
101             [% ELSE %]
102                 <input type="checkbox" name="mandatory" id="mandatory" value="1" />
103             [% END %]
104         </li>
105         <li><label for="authorised_value">Authorized value: </label>
106             <select name="authorised_value" id="authorised_value" size="1">
107                 <option value=""></option>
108                 [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => authorised_value ) %]
109             </select>
110             (if you select a value here, the indicators will be limited to the authorized value list)
111         </li>
112         </ol>
113         </fieldset>
114         <fieldset class="action">
115             <input type="submit" value="Submit" />
116             <a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode | uri %]" class="cancel">Cancel</a>
117         </fieldset>
118     </form>
119 [% END %]
120
121
122 [% IF ( delete_confirm ) %]
123     <div class="dialog alert">
124         <h3>Confirm deletion</h3>
125         <form action="[% script_name | html %]" method="post">
126             <table>
127                 <tr><th scope="row">Tag: </th><td>[% searchfield | html %] [% liblibrarian | html %]</td></tr>
128             </table>
129             <input type="hidden" name="op" value="delete_confirmed" />
130             <input type="hidden" name="authtypecode" value="[% authtypecode | html %]" />
131             <input type="hidden" name="searchfield" value="[% searchfield | html %]" />
132             <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
133         </form>
134         <form action="[% script_name | html %]" method="get">
135             <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
136         </form>
137     </div>
138 [% END %]
139
140 [% IF ( delete_confirmed ) %]
141
142   <div class="dialog message">  <h3>Data deleted</h3>
143     <form action="[% script_name | html %]" method="post">
144     <input type="hidden" name="authtypecode" value="[% authtypecode | html %]" />
145     <input type="hidden" name="searchfield" value="[% searchfield | html %]" />
146     <input type="submit" value="OK" class="submit" />
147     </form></div>
148 [% END %]
149 [% IF ( authtype_create ) %]
150
151     <form action="[% script_name | html %]" method="post">
152         <input type="hidden" name="op" value="authtype_create_confirm" />
153         <input type="hidden" name="authtypecode" value="[% authtypecode | html %]" />
154         Create authority framework for [% authtypecode | html %] using
155         <select name="existingauthtypecode">
156         [% FOREACH existingauthtypeloo IN existingauthtypeloop %]
157             [% IF existingauthtypeloo.value == "" %]
158               <option value="" selected="selected">[% existingauthtypeloo.authtypetext | html %]</option>
159             [% ELSE %]
160               <option value="[% existingauthtypeloo.value | html %]">[% existingauthtypeloo.authtypetext | html %]</option>
161             [% END %]
162         [% END %]
163         </select>
164         <input type="submit" value="OK" class="submit" />
165     </form>
166 [% END %]
167
168
169 [% IF ( else ) %]
170
171 <div id="toolbar" class="btn-toolbar">
172     <div class="btn-group"><a class="btn btn-default" id="newtag" href="/cgi-bin/koha/admin/auth_tag_structure.pl?op=add_form&amp;authtypecode=[% authtypecode | uri %]"><i class="fa fa-plus"></i> New tag</a></div>
173 </div>
174
175 <h2>Select an authority framework</h2>
176 <form action="[% script_name | html %]" method="post">
177     <select name="authtypecode">
178     [% FOREACH authority_type IN authority_types%]
179         [% IF authority_type.authtypecode == authtypecode%]
180         <option value="[% authority_type.authtypecode | html %]" selected="selected">[% authority_type.authtypetext | html %]</option>
181         [% ELSE %]
182         <option value="[% authority_type.authtypecode | html %]">[% authority_type.authtypetext | html %]</option>
183         [% END %]
184     [% END %]
185     </select>
186     <input type="text" name="searchfield" value="[% searchfield | html %]" />
187     <input type="submit" value="OK" class="submit" />
188 </form><br />
189 <div id="pagertable_authtagstructure">
190 </div>
191 <table id="table_authtagstructure">
192     <thead>
193         <tr>
194             <th>Tag</th>
195             <th>Lib</th>
196             <th>Repeatable</th>
197             <th>Mandatory</th>
198             <th>Authorized<br />value</th>
199             <th>&nbsp;</th>
200         </tr>
201     </thead>
202     <tbody>
203         [% FOREACH loo IN loop %]
204         <tr>
205             <td><strong>[% loo.tagfield | html %]</strong></td>
206             <td>[% loo.liblibrarian | html %]</td>
207             <td>[% IF ( loo.repeatable ) %]Yes[% ELSE %]No[% END %]</td>
208             <td>[% IF ( loo.mandatory ) %]Yes[% ELSE %]No[% END %]</td>
209             <td>[% loo.authorised_value | html %]</td>
210             <td>
211                 <div class="btn-group dropup">
212                     <a class="btn btn-default btn-xs dropdown-toggle" id="authtagactions[% loo.tagfield | html %]" role="button" data-toggle="dropdown" href="#">
213                         Actions <b class="caret"></b></a>
214                     <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="authtagactions[% loo.tagfield | html %]">
215                         <li><a href="auth_subfields_structure.pl?tagfield=[% loo.tagfield | uri %]&amp;authtypecode=[% authtypecode | uri %]"><i class="fa fa-eye"></i> Subfields</a></li>
216                         <li><a href="?op=add_form&amp;searchfield=[% loo.tagfield | uri %]&amp;authtypecode=[% authtypecode | uri %]"><i class="fa fa-pencil"></i> Edit</a></li>
217                         <li><a href="?op=delete_confirm&amp;searchfield=[% loo.tagfield | uri %]&amp;authtypecode=[% authtypecode | uri %]"><i class="fa fa-trash"></i> Delete</a></li>
218                     </ul>
219                 </div>
220             </td>
221         </tr>
222         [% END %]
223     </tbody>
224     </table>
225
226 [% END %]
227
228             </main>
229         </div> <!-- /.col-sm-10.col-sm-push-2 -->
230
231         <div class="col-sm-2 col-sm-pull-10">
232             <aside>
233                 [% INCLUDE 'admin-menu.inc' %]
234             </aside>
235         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
236      </div> <!-- /.row -->
237
238 [% MACRO jsinclude BLOCK %]
239     [% INCLUDE 'datatables.inc' %]
240     [% Asset.js("js/admin-menu.js") | $raw %]
241     <script>
242         $(document).ready(function() {
243             $("#table_authtagstructure").dataTable($.extend(true, {}, dataTablesDefaults, {
244                 "aoColumnDefs": [
245                     { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
246                 ],
247                 "sPaginationType": "full"
248             }));
249         });
250     </script>
251 [% END %]
252 [% INCLUDE 'intranet-bottom.inc' %]