Bug 10907: Optionally show the staff member's name who managed a suggestion in OPAC
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / auth_tag_structure.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Administration &rsaquo; Authority MARC framework [% IF ( add_form ) %][% IF ( use_heading_flags_p ) %]
3     [% IF ( heading_modify_tag_p ) %]&rsaquo; [% IF ( authtypecode ) %][% authtypecode %] Framework[% ELSE %]Default framework[% END %] &rsaquo; Modify tag[% END %]
4     [% IF ( heading_add_tag_p ) %]&rsaquo; [% IF ( authtypecode ) %][% authtypecode %] Framework[% ELSE %]Default framework[% END %] &rsaquo; New tag[% END %]
5     [% ELSE %]&rsaquo; [% action %][% END %][% END %][% IF ( delete_confirm ) %]&rsaquo; [% IF ( authtypecode ) %][% authtypecode %] Framework[% ELSE %]Default framework[% END %] &rsaquo; Confirm deletion[% END %][% IF ( delete_confirmed ) %]&rsaquo; [% IF ( authtypecode ) %][% authtypecode %] Framework[% ELSE %]Default framework[% END %] &rsaquo; Data deleted[% END %]</title>
6 [% INCLUDE 'doc-head-close.inc' %]
7
8 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
9 [% INCLUDE 'datatables.inc' %]
10 <script type="text/javascript">
11 //<![CDATA[
12  $(document).ready(function() {
13     $("#table_authtagstructure").dataTable($.extend(true, {}, dataTablesDefaults, {
14         "aoColumnDefs": [
15             { "aTargets": [ -1, -2, -3 ], "bSortable": false, "bSearchable": false },
16         ],
17         "iDisplayLength": 20,
18         "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
19         "sPaginationType": "four_button"
20     }));
21  });
22
23     /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
24     function isNotNull(f,noalert) {
25         if (f.value.length ==0) {
26 return false;
27         }
28         return true;
29     }
30     /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
31     function toUC(f) {
32         var x=f.value.toUpperCase();
33         f.value=x;
34         return true;
35     }
36     /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
37     function isNum(v,maybenull) {
38     var n = new Number(v.value);
39     if (isNaN(n)) {
40         return false;
41         }
42     if (maybenull==0 && v.value=='') {
43         return false;
44     }
45     return true;
46     }
47     /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
48     function isDate(f) {
49         var t = Date.parse(f.value);
50         if (isNaN(t)) {
51             return false;
52         }
53     }
54     /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
55     function Check(f) {
56         var ok=1;
57         var _alertString="";
58         var alertString2;
59         if (f.tagfield.value.length==0) {
60             _alertString += "\n- " + _("tag number missing");
61         }
62         if (_alertString.length==0) {
63             document.Aform.submit();
64         } else {
65             alertString2  = _("Form not submitted because of the following problem(s)");
66             alertString2 += "\n------------------------------------------------------------------------------------\n";
67             alertString2 += _alertString;
68             alert(alertString2);
69         }
70     }
71     //]]>
72 </script>
73 </head>
74 <body id="admin_auth_tag_structure" class="admin">
75 [% INCLUDE 'header.inc' %]
76 [% INCLUDE 'cat-search.inc' %]
77
78 <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;
79     <a href="/cgi-bin/koha/admin/authtypes.pl">Authority types</a> &rsaquo;
80     [% IF ( add_form ) %]
81         [% IF ( use_heading_flags_p ) %]
82             [% IF ( heading_modify_tag_p ) %]
83                 [% IF ( authtypecode ) %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode %]">[% authtypecode %] Framework</a>
84                 [% ELSE %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl">Default framework</a>
85                 [% END %] &rsaquo; Modify tag
86             [% END %]
87             [% IF ( heading_add_tag_p ) %]
88                 [% IF ( authtypecode ) %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode %]">[% authtypecode %] framework</a>
89                 [% ELSE %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl">Default framework</a>
90                 [% END %] &rsaquo; New tag
91             [% END %]
92         [% ELSE %]
93             [% IF ( authtypecode ) %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode %]">[% authtypecode %] Framework</a>
94             [% ELSE %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl">Default framework</a>
95             [% END %] &rsaquo; [% action %]
96         [% END %]
97     [% ELSE %]
98         [% IF ( delete_confirm ) %]
99             [% IF ( authtypecode ) %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode %]">[% authtypecode %] framework</a>
100             [% ELSE %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl">Default framework</a>
101             [% END %] &rsaquo; Confirm deletion
102         [% ELSE %]
103             [% IF ( delete_confirmed ) %]
104                 [% IF ( authtypecode ) %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode %]">[% authtypecode %] framework</a>
105                 [% ELSE %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl">Default framework</a>
106                 [% END %] &rsaquo; Data deleted
107             [% ELSE %]
108                 [% IF ( authtypecode ) %][% authtypecode %] Framework</a>
109                 [% ELSE %]Default framework
110                 [% END %]
111             [% END %]
112         [% END %]
113     [% END %]
114 </div>
115
116 <div id="doc3" class="yui-t2">
117    
118    <div id="bd">
119     <div id="yui-main">
120     <div class="yui-b">
121
122 <h1>Authority MARC framework for [% IF ( authtypecode ) %][% authtypecode %][% ELSE %]default framework[% END %]</h1>
123
124
125 [% IF ( add_form ) %]
126
127     <h2>
128     [% IF ( use_heading_flags_p ) %]
129     [% IF ( heading_modify_tag_p ) %]Modify tag[% END %]
130     [% IF ( heading_add_tag_p ) %]New tag[% END %]
131     [% ELSE %][% action %][% END %]
132     </h2>
133     <form action="[% script_name %]" name="Aform" method="post">
134         <input type="hidden" name="op" value="add_validate" />
135         [% IF ( heading_modify_tag_p ) %]<input type="hidden" name="modif" value="1" />[% END %]
136         <input type="hidden" name="authtypecode" value="[% authtypecode %]" />
137         <fieldset class="rows"><ol>
138         <li><span class="label">Tag: </span>[% searchfield %]</li>
139         <li><label for="liblibrarian">Text for librarians: </label><input type="text" name="liblibrarian" id="liblibrarian" value="[% liblibrarian |html %]" size="40" maxlength="100" /></li>
140         <li><label for="libopac">Text for opac: </label><input type="text" name="libopac" id="libopac" value="[% libopac |html %]" size="40" maxlength="100" /></li>
141         <li><label for="repeatable">Repeatable: </label>
142             [% IF ( repeatable ) %]
143                 <input type="checkbox" name="repeatable" id="repeatable" value="1" checked="checked" />
144             [% ELSE %]
145                 <input type="checkbox" name="repeatable" id="repeatable" value="1" />
146             [% END %]
147         </li>
148         <li><label for="mandatory">Mandatory: </label>
149             [% IF ( mandatory ) %]
150                 <input type="checkbox" name="mandatory" id="mandatory" value="1" checked="checked" />
151             [% ELSE %]
152                 <input type="checkbox" name="mandatory" id="mandatory" value="1" />
153             [% END %]
154             </li>
155         <li><label for="authorised_value">Authorized value: </label>[% authorised_value %] (if you select a value here, the indicators will be limited to the authorized value list)</li>
156 </ol></fieldset>
157         <p><input type="button" value="Submit" class="button" onclick="Check(this.form)" /></p>
158     </form>
159 [% END %]
160
161
162 [% IF ( delete_confirm ) %]
163         <div class="dialog alert">
164         <h3>Confirm deletion</h3>
165         <form action="[% script_name %]" method="post">
166         <table>
167             <tr><th scope="row">Tag: </th><td>[% searchfield %] [% liblibrarian %]</td></tr>
168         </table>
169         <input type="hidden" name="op" value="delete_confirmed" />
170         <input type="hidden" name="authtypecode" value="[% authtypecode %]" />
171         <input type="hidden" name="searchfield" value="[% searchfield %]" />
172         <input type="submit" value="Yes, delete" class="approve"></form>
173         <form action="[% script_name %]" method="get"><input type="submit" class="deny" value="No, do not delete" /></form>
174         </div>
175 [% END %]
176
177 [% IF ( delete_confirmed ) %]
178
179   <div class="dialog message">  <h3>Data deleted</h3>
180     <form action="[% script_name %]" method="post">
181     <input type="hidden" name="authtypecode" value="[% authtypecode %]" />
182     <input type="hidden" name="searchfield" value="[% searchfield %]" />
183     <input type="submit" value="OK" class="submit" />
184     </form></div>
185 [% END %]
186 [% IF ( authtype_create ) %]
187
188     <form action="[% script_name %]" method="post">
189         <input type="hidden" name="op" value="authtype_create_confirm" />
190         <input type="hidden" name="authtypecode" value="[% authtypecode %]" />
191         Create authority framework for [% authtypecode %] using
192         <select name="existingauthtypecode">
193         [% FOREACH existingauthtypeloo IN existingauthtypeloop %]
194             [% IF existingauthtypeloo.value == "" %]
195               <option value="" selected="selected">[% existingauthtypeloo.authtypetext %]</option>
196             [% ELSE %]
197               <option value="[% existingauthtypeloo.value %]">[% existingauthtypeloo.authtypetext %]</option>
198             [% END %]
199         [% END %]
200         </select>
201         <input type="submit" value="OK" class="submit" />
202     </form>
203 [% END %]
204
205
206 [% IF ( else ) %]
207
208 <div id="toolbar" class="btn-toolbar">
209     <div class="btn-group"><a class="btn btn-small" id="newtag" href="/cgi-bin/koha/admin/auth_tag_structure.pl?op=add_form&amp;authtypecode=[% authtypecode %]"><i class="icon-plus"></i> New tag</a></div>
210 </div>
211
212 <h2>Select an authority framework</h2>
213 <form action="[% script_name %]" method="post">
214     <select name="authtypecode">
215     [% FOREACH authtypeloo IN authtypeloop %]
216         [% IF ( authtypeloo.selected ) %]
217         <option value="[% authtypeloo.value %]" selected="selected">[% authtypeloo.authtypetext %]</option>
218         [% ELSE %]
219         <option value="[% authtypeloo.value %]">[% authtypeloo.authtypetext %]</option>
220         [% END %]
221             
222     [% END %]
223     </select>
224     <input type="text" name="searchfield" value="[% searchfield %]" />
225     <input type="submit" value="OK" class="submit" />
226 </form><br />
227 <div id="pagertable_authtagstructure">
228 </div>
229 <table id="table_authtagstructure">
230     <thead>
231         <th>Tag</th>
232         <th>Lib</th>
233         <th>Repeatable</th>
234         <th>Mandatory</th>
235         <th>Authorized<br />value</th>
236         <th>Subfields</th>
237         <th>Edit</th>
238         <th>Delete</th>
239     </thead>
240     [% FOREACH loo IN loop %]
241     [% UNLESS ( loop.odd ) %]
242     <tr class="highlight">
243     [% ELSE %]
244     <tr>
245     [% END %]
246         <td><b>[% loo.tagfield %]</b></td>
247         <td>[% loo.liblibrarian %]</td>
248         <td>[% IF ( loo.repeatable ) %]Yes[% ELSE %]No[% END %]</td>
249         <td>[% IF ( loo.mandatory ) %]Yes[% ELSE %]No[% END %]</td>
250         <td>[% loo.authorised_value %]</td>
251         <td><a href="[% loo.subfield_link %]" class="button">subfields</a></td>
252         <td><a href="[% loo.edit %]">Edit</a></td>
253         <td><a href="[% loo.delete %]">Delete</a></td>
254     </tr>
255     [% END %]
256     </table>
257
258 [% END %]
259
260 </div>
261 </div>
262 <div class="yui-b">
263 [% INCLUDE 'admin-menu.inc' %]
264 </div>
265 </div>
266 [% INCLUDE 'intranet-bottom.inc' %]