Moving inline script blocks to <head> where possible
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / authtypes.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; System Administration</title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <script type="text/javascript">
5 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
6 function isNotNull(f,noalert) {
7         if (f.value.length ==0) {
8                 return false;
9         }
10         return true;
11 }
12 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
13 function toUC(f) {
14         var x=f.value.toUpperCase();
15         f.value=x;
16         return true;
17 }
18 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
19 function isNum(v,maybenull) {
20 var n = new Number(v.value);
21 if (isNaN(n)) {
22         return false;
23         }
24 if (maybenull==0 && v.value=='') {
25         return false;
26 }
27 return true;
28 }
29 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
30 function isDate(f) {
31         var t = Date.parse(f.value);
32         if (isNaN(t)) {
33                 return false;
34         }
35 }
36 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
37 function Check(f) {
38         var ok=1;
39         var _alertString="";
40         var alertString2;
41         if (f.authtypecode.value.length==0) {
42                 _alertString += "\n- " + _("Authority type : code missing");
43         }
44         if (!(isNotNull(window.document.Aform.authtypetext,1))) {
45                 _alertString += "\n- " + _("Description missing");
46         }
47         if (_alertString.length==0) {
48                 document.Aform.submit();
49         } else {
50                 alertString2  = _("Form not submitted because of the following problem(s)");
51                 alertString2 += "\n------------------------------------------------------------------------------------\n";
52                 alertString2 += _alertString;
53                 alert(alertString2);
54         }
55 }
56 </script>
57 </head>
58 <body>
59 <!-- TMPL_INCLUDE NAME="header.inc" -->
60
61
62 <!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
63
64
65
66 <div id="doc3" class="yui-t2">
67    
68    <div id="bd">
69         <div id="yui-main">
70         <div class="yui-b"><div class="yui-g">
71
72 <!-- TMPL_IF NAME="add_form" -->
73
74         <form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
75         <table>
76                 <!-- TMPL_IF NAME="authtypecode" -->
77                 <caption>Modify authority type</caption>
78         <!-- TMPL_ELSE -->
79                 <caption>Add authority type</caption>
80         <!-- /TMPL_IF -->
81                         <!-- TMPL_IF NAME="authtypecode" -->
82                                 <tr><td><label for="authtypecode">Authority type<label></td><td><input type="hidden" name="op" value="add_validate" />
83                 <input type="hidden" name="checked" value="0" /><input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->" /><!-- TMPL_VAR NAME="authtypecode" --></td></tr>
84                         <!-- TMPL_ELSE -->
85                                 <tr><td><label for="authtypecode">Authority type<label></td><td><input id="authtypecode" type="text" name="authtypecode" size="10" maxlength="10" onblur="toUC(this)" /></td></tr>
86                         <!-- /TMPL_IF -->
87                 <tr><td><label for="authtypetext">Description</label></td><td><input type="text" id="authtypetext" name="authtypetext" size="40" maxlength="80" value="<!-- TMPL_VAR NAME="authtypetext" ESCAPE="HTML" -->" /></td></tr>
88                 <tr><td><label for="summary">Summary</label></td><td><textarea id="summary" name="summary" cols="40" rows="10"><!-- TMPL_VAR NAME="summary" --></textarea></td></tr>
89                 <tr><td><label for="auth_tag_to_report">Report tag</label></td><td><input type="text" id="auth_tag_to_report" name="auth_tag_to_report" size="5" maxlength="3" value="<!-- TMPL_VAR NAME="auth_tag_to_report">" />Enter here the number of the tag that will be reported in the biblio (subfield by subfield). For example, in UNIMARC, enter 200 to report every 200 subfield in the 70x biblio</td></tr></table>
90         <input type="hidden" name="op" value="add_validate" />
91         <p><input type="submit" value="OK" onclick="Check(this.form); return false;" />
92                         </p>
93         </form>
94 <!-- /TMPL_IF -->
95
96 <!-- TMPL_IF NAME="delete_confirm" -->
97 <div>
98         <h2>Authority structure definition for <!-- TMPL_VAR NAME="authtypetext" --> (<!-- TMPL_VAR NAME="authtypecode" -->)</h2>
99         <!-- TMPL_IF NAME="total" -->
100                 <p>
101                         This record is used <!-- TMPL_VAR NAME="total" --> times
102                 </p>
103         <!-- /TMPL_IF -->
104         <p>CONFIRM DELETION</p>
105         <p>
106                 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
107                         <input type="hidden" name="op" value="delete_confirmed" />
108                         <input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->" />
109                         <input type="submit" value="YES" />
110                 </form>
111                 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
112                         <input type="submit" value="NO" />
113                 </form>
114         </p>
115
116 <!-- /TMPL_IF -->
117
118 <!-- TMPL_IF NAME="else" -->
119 <h1>Auth type Admin</h1>
120 <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>
121 <table>
122         <tr>
123                 <th>Code</th>
124                 <th>Description</th>
125                 <th>Summary</th>
126                 <th>Tag reported</th>
127                 <th>&nbsp;</th>
128                 <th>Edit</th>
129                 <th>Delete</th>
130         </tr>
131         
132         <!-- TMPL_LOOP NAME="loop" -->
133                 <tr>
134                         <td><!-- TMPL_VAR NAME="authtypecode" --></td>
135                         <td><!-- TMPL_VAR NAME="authtypetext" --></td>
136                         <td><!-- TMPL_VAR NAME="summary" --></td>
137                         <td><!-- TMPL_VAR NAME="auth_tag_to_report" --></td>
138                         <td><a href="auth_tag_structure.pl?authtypecode=<!-- TMPL_VAR NAME="authtypecode" -->" class="button parameters" >MARC structure</a></td>
139                         <td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form&amp;authtypecode=<!-- TMPL_VAR NAME="authtypecode" escape="HTML" -->">Edit</a></td>
140                         <td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=delete_confirm&amp;authtypecode=<!-- TMPL_VAR NAME="authtypecode" escape="HTML" -->">Delete</a></td>
141                 </tr>
142         <!-- /TMPL_LOOP -->
143 </table>
144 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
145         <input type="hidden" name="op" value="add_form" />
146         <input type="submit" value="Add authority type" />
147         <td width="33%"><!-- TMPL_IF NAME="previous" --><a href="<!-- TMPL_VAR NAME="previous" -->">&lt;&lt; Previous</a><!-- /TMPL_IF --></td>
148         <td width="33%"><!-- TMPL_IF NAME="next" --><a href="<!-- TMPL_VAR NAME="next" -->">Next &gt;&gt;</a><!-- /TMPL_IF --></td>
149 </form>
150
151 <!-- /TMPL_IF -->
152 </div>
153 </div>
154 </div>
155
156 <!-- TMPL_INCLUDE NAME="mainmenu.inc" -->
157 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->