Bug 2835 - Inconsistent use of colon at the end of sentences
[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 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
10 [% INCLUDE 'datatables-strings.inc' %]
11 <script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
12 <script type="text/javascript">
13 //<![CDATA[
14  $(document).ready(function() {
15     $("#table_authtagstructure").dataTable($.extend(true, {}, dataTablesDefaults, {
16         "aoColumnDefs": [
17             { "aTargets": [ -1, -2, -3 ], "bSortable": false, "bSearchable": false },
18         ],
19         "iDisplayLength": 20,
20         "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
21         "sPaginationType": "four_button"
22     }));
23  });
24
25     /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
26     function isNotNull(f,noalert) {
27         if (f.value.length ==0) {
28 return false;
29         }
30         return true;
31     }
32     /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
33     function toUC(f) {
34         var x=f.value.toUpperCase();
35         f.value=x;
36         return true;
37     }
38     /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
39     function isNum(v,maybenull) {
40     var n = new Number(v.value);
41     if (isNaN(n)) {
42         return false;
43         }
44     if (maybenull==0 && v.value=='') {
45         return false;
46     }
47     return true;
48     }
49     /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
50     function isDate(f) {
51         var t = Date.parse(f.value);
52         if (isNaN(t)) {
53             return false;
54         }
55     }
56     /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
57     function Check(f) {
58         var ok=1;
59         var _alertString="";
60         var alertString2;
61         if (f.tagfield.value.length==0) {
62             _alertString += "\n- " + _("tag number missing");
63         }
64         if (_alertString.length==0) {
65             document.Aform.submit();
66         } else {
67             alertString2  = _("Form not submitted because of the following problem(s)");
68             alertString2 += "\n------------------------------------------------------------------------------------\n";
69             alertString2 += _alertString;
70             alert(alertString2);
71         }
72     }
73     //]]>
74 </script>
75 </head>
76 <body id="admin_auth_tag_structure" class="admin">
77 [% INCLUDE 'header.inc' %]
78 [% INCLUDE 'cat-search.inc' %]
79
80 <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;
81     <a href="/cgi-bin/koha/admin/authtypes.pl">Authority types</a> &rsaquo;
82     [% IF ( add_form ) %]
83         [% IF ( use_heading_flags_p ) %]
84             [% IF ( heading_modify_tag_p ) %]
85                 [% IF ( authtypecode ) %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode %]">[% authtypecode %] Framework</a>
86                 [% ELSE %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl">Default framework</a>
87                 [% END %] &rsaquo; Modify tag
88             [% END %]
89             [% IF ( heading_add_tag_p ) %]
90                 [% IF ( authtypecode ) %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode %]">[% authtypecode %] framework</a>
91                 [% ELSE %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl">Default framework</a>
92                 [% END %] &rsaquo; New tag
93             [% END %]
94         [% ELSE %]
95             [% IF ( authtypecode ) %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode %]">[% authtypecode %] Framework</a>
96             [% ELSE %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl">Default framework</a>
97             [% END %] &rsaquo; [% action %]
98         [% END %]
99     [% ELSE %]
100         [% IF ( delete_confirm ) %]
101             [% IF ( authtypecode ) %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode %]">[% authtypecode %] framework</a>
102             [% ELSE %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl">Default framework</a>
103             [% END %] &rsaquo; Confirm deletion
104         [% ELSE %]
105             [% IF ( delete_confirmed ) %]
106                 [% IF ( authtypecode ) %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode %]">[% authtypecode %] framework</a>
107                 [% ELSE %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl">Default framework</a>
108                 [% END %] &rsaquo; Data deleted
109             [% ELSE %]
110                 [% IF ( authtypecode ) %][% authtypecode %] Framework</a>
111                 [% ELSE %]Default framework
112                 [% END %]
113             [% END %]
114         [% END %]
115     [% END %]
116 </div>
117
118 <div id="doc3" class="yui-t2">
119    
120    <div id="bd">
121     <div id="yui-main">
122     <div class="yui-b">
123
124 <h1>Authority MARC framework for [% IF ( authtypecode ) %][% authtypecode %][% ELSE %]default framework[% END %]</h1>
125
126
127 [% IF ( add_form ) %]
128
129     <h2>
130     [% IF ( use_heading_flags_p ) %]
131     [% IF ( heading_modify_tag_p ) %]Modify tag[% END %]
132     [% IF ( heading_add_tag_p ) %]New tag[% END %]
133     [% ELSE %][% action %][% END %]
134     </h2>
135     <form action="[% script_name %]" name="Aform" method="post">
136         <input type="hidden" name="op" value="add_validate" />
137         [% IF ( heading_modify_tag_p ) %]<input type="hidden" name="modif" value="1" />[% END %]
138         <input type="hidden" name="authtypecode" value="[% authtypecode %]" />
139         <fieldset class="rows"><ol>
140         <li><span class="label">Tag: </span>[% searchfield %]</li>
141         <li><label for="liblibrarian">Text for librarians: </label><input type="text" name="liblibrarian" id="liblibrarian" value="[% liblibrarian |html %]" size="40" maxlength="100" /></li>
142         <li><label for="libopac">Text for opac: </label><input type="text" name="libopac" id="libopac" value="[% libopac |html %]" size="40" maxlength="100" /></li>
143         <li><label for="repeatable">Repeatable: </label>
144             [% IF ( repeatable ) %]
145                 <input type="checkbox" name="repeatable" id="repeatable" value="1" checked="checked" />
146             [% ELSE %]
147                 <input type="checkbox" name="repeatable" id="repeatable" value="1" />
148             [% END %]
149         </li>
150         <li><label for="mandatory">Mandatory: </label>
151             [% IF ( mandatory ) %]
152                 <input type="checkbox" name="mandatory" id="mandatory" value="1" checked="checked" />
153             [% ELSE %]
154                 <input type="checkbox" name="mandatory" id="mandatory" value="1" />
155             [% END %]
156             </li>
157         <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>
158 </ol></fieldset>
159         <p><input type="button" value="Submit" class="button" onclick="Check(this.form)" /></p>
160     </form>
161 [% END %]
162
163
164 [% IF ( delete_confirm ) %]
165         <div class="dialog alert">
166         <h3>Confirm deletion</h3>
167         <form action="[% script_name %]" method="post">
168         <table>
169             <tr><th scope="row">Tag: </th><td>[% searchfield %] [% liblibrarian %]</td></tr>
170         </table>
171         <input type="hidden" name="op" value="delete_confirmed" />
172         <input type="hidden" name="authtypecode" value="[% authtypecode %]" />
173         <input type="hidden" name="searchfield" value="[% searchfield %]" />
174         <input type="submit" value="Yes, delete" class="approve"></form>
175         <form action="[% script_name %]" method="get"><input type="submit" class="deny" value="No, do not delete" /></form>
176         </div>
177 [% END %]
178
179 [% IF ( delete_confirmed ) %]
180
181   <div class="dialog message">  <h3>Data deleted</h3>
182     <form action="[% script_name %]" method="post">
183     <input type="hidden" name="authtypecode" value="[% authtypecode %]" />
184     <input type="hidden" name="searchfield" value="[% searchfield %]" />
185     <input type="submit" value="OK" class="submit" />
186     </form></div>
187 [% END %]
188 [% IF ( authtype_create ) %]
189
190     <form action="[% script_name %]" method="post">
191         <input type="hidden" name="op" value="authtype_create_confirm" />
192         <input type="hidden" name="authtypecode" value="[% authtypecode %]" />
193         Create authority framework for [% authtypecode %] using
194         <select name="existingauthtypecode">
195             <option value="">Default</option>
196         [% FOREACH existingauthtypeloo IN existingauthtypeloop %]
197             <option value="[% existingauthtypeloo.value %]">[% existingauthtypeloo.authtypetext %]</option>
198         [% END %]
199         </select>
200         <input type="submit" value="OK" class="submit" />
201     </form>
202 [% END %]
203
204
205 [% IF ( else ) %]
206
207 <div id="toolbar" class="btn-toolbar">
208     <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>
209 </div>
210
211 <h2>Select an authority framework</h2>
212 <form action="[% script_name %]" method="post">
213     <select name="authtypecode">
214         <option value="">Default</option>
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' %]