Bug 11618: ensure jQuery timepicker is picked up by the i18n toolchain
[koha_fer] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / authtypes.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Administration &rsaquo; Authority types
3 [% IF ( add_form ) %]
4 &rsaquo; [% IF ( authtypecode ) %]Modify authority type[% ELSE %]New authority type[% END %]
5 [% ELSIF ( delete_confirm ) %]
6 &rsaquo; Confirm deletion of authority type
7 [% END %]
8 </title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 <script type="text/javascript">
11 //<![CDATA[
12 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
13 function isNotNull(f,noalert) {
14         if (f.value.length ==0) {
15                 return false;
16         }
17         return true;
18 }
19 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
20 function Check(f) {
21         var _alertString="";
22         var alertString2;
23         if (f.authtypecode.value.length==0) {
24                 _alertString += "\n- " + _("Authority type : code missing");
25         }
26         if (!(isNotNull(window.document.Aform.authtypetext,1))) {
27                 _alertString += "\n- " + _("Description missing");
28         }
29         if (_alertString.length==0) {
30                 document.Aform.submit();
31         } else {
32                 alertString2  = _("Form not submitted because of the following problem(s)");
33                 alertString2 += "\n------------------------------------------------------------------------------------\n";
34                 alertString2 += _alertString;
35                 alert(alertString2);
36         }
37 }
38
39 //]]>
40 </script>
41 </head>
42 <body id="admin_authtypes" class="admin">
43 [% INCLUDE 'header.inc' %]
44 [% INCLUDE 'cat-search.inc' %]
45
46 <div id="breadcrumbs">
47          <a href="/cgi-bin/koha/mainpage.pl">Home</a>
48 &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
49 &rsaquo; <a href="[% script_name %]">Authority types</a>
50 [% IF ( add_form ) %]
51 &rsaquo; [% IF ( authtypecode ) %]Modify[% ELSE %]New[% END %] Authority type
52 [% ELSIF ( delete_confirm ) %]
53 &rsaquo; Confirm deletion of authority type
54 [% END %]
55 </div>
56
57 <div id="doc3" class="yui-t2">
58   <div id="bd">
59         <div id="yui-main">
60           <div class="yui-b">
61
62 [% IF ( add_form ) %]
63
64     <form action="[% script_name %]" name="Aform" method="post">
65     <fieldset class="rows">
66     <legend>
67     [% IF ( authtypecode ) %]
68         Modify authority type
69         [% ELSE %]
70         New authority type
71         [% END %]
72     </legend>
73     <ol>
74         <li>
75     [% IF ( authtypecode ) %]
76             <span class="label">Authority type</span>
77             <input type="hidden" name="op" value="add_validate" />
78             <input type="hidden" name="checked" value="0" />
79             <input type="hidden" name="authtypecode" value="[% authtypecode %]" />[% authtypecode %]
80     [% ELSE %]
81             <label for="authtypecode">Authority type: </label>
82             <input id="authtypecode" type="text" name="authtypecode" size="10" maxlength="10" onblur="toUC(this)" />
83     [% END %]
84         </li>
85                 <li><label for="authtypetext">Description: </label><input type="text" id="authtypetext" name="authtypetext" size="40" maxlength="80" value="[% authtypetext |html %]" /></li>
86                 <li><label for="summary">Summary: </label><textarea id="summary" name="summary" cols="55" rows="7">[% summary %]</textarea></li>
87                 <li>
88                 <p class="tip">Note: for 'Authority field to copy', enter the authority field that should be copied from the authority record to the bibliographic record. E.g., in MARC21, field 100 in the authority record should be copied to field 100 in the bibliographic record</p>
89                 <label for="auth_tag_to_report">Authority field to copy: </label><input type="text" id="auth_tag_to_report" name="auth_tag_to_report" size="5" maxlength="3" value="[% auth_tag_to_report %]" />
90                 <input type="hidden" name="op" value="add_validate" />
91         [% IF ( authtypecode ) %]
92         <input type="hidden" name="modif" value="1" />
93         [% END %]
94         </li>
95     </ol>
96         </fieldset>
97         <fieldset class="action"><input type="submit" value="Submit" onclick="Check(this.form); return false;" />
98         <a class="cancel" href="[% script_name %]">Cancel</a>
99     </fieldset>
100         </form>
101 [% END %]
102
103 [% IF ( delete_confirm ) %]
104         <div class="dialog alert"><h3>Confirm deletion of authority structure definition for <span class="ex">'[% authtypetext %]' ([% authtypecode %])</span></h3>
105         [% IF ( total ) %]
106                 <p>This record is used <strong>[% total %]</strong> times</p>
107         [% END %]               
108                         <form action="[% script_name %]" method="post"><input type="hidden" name="op" value="delete_confirmed" />
109                         <input type="hidden" name="authtypecode" value="[% authtypecode %]" />
110                         <fieldset class="action"><input type="submit" class="approve" value="Yes, Delete" />
111                 </form>
112                 <form action="[% script_name %]" method="get"><input type="submit" class="deny" value="No, Do Not Delete" /></form>
113                 </div>
114 [% END %]
115
116 [% IF ( else ) %]
117
118 <div id="toolbar" class="btn-toolbar">
119     <a id="authtype" class="btn btn-small" href="[% script_name %]?op=add_form"><i class="icon-plus"></i> New authority type</a>
120 </div>
121
122 <h1>Authority types</h1>
123 <p>Define authority types, then authority MARC structure in the same way you define itemtypes and biblio MARC tag structure. Authority values are managed through plugins</p>
124 <table>
125         <tr>
126                 <th>Code</th>
127                 <th>Description</th>
128                 <th>Summary</th>
129                 <th>Auth field copied</th>
130                 <th>&nbsp;</th>
131                 <th>Edit</th>
132                 <th>Delete</th>
133         </tr>
134         
135         [% FOREACH loo IN loop %]
136         [% IF ( loop.odd ) %]
137                 <tr>
138         [% ELSE %]
139         <tr class="highlight">
140         [% END %]
141                         <td>[% loo.authtypecode %]</td>
142                         <td>[% loo.authtypetext %]</td>
143                         <td>[% loo.summary %]</td>
144                         <td>[% loo.auth_tag_to_report %]</td>
145                         <td><a href="auth_tag_structure.pl?authtypecode=[% loo.authtypecode %]" class="button parameters" >MARC structure</a></td>
146                         <td><a href="[% loo.script_name %]?op=add_form&amp;authtypecode=[% loo.authtypecode |html %]">Edit</a></td>
147                         <td><a href="[% loo.script_name %]?op=delete_confirm&amp;authtypecode=[% loo.authtypecode |html %]">Delete</a></td>
148                 </tr>
149         [% END %]
150 </table>
151
152         [% IF ( previous ) %]<p><a href="[% previous %]">&lt;&lt; Previous</a></p>[% END %]
153         [% IF ( next ) %]<p><a href="[% next %]">Next &gt;&gt;</a></p>[% END %]
154
155 [% END %]
156 </div>
157 </div>
158 <div class="yui-b">
159 [% INCLUDE 'admin-menu.inc' %]
160 </div>
161 </div>
162 [% INCLUDE 'intranet-bottom.inc' %]