Fixing a bug that occured if Koha wasnt installed, but a cookie was set in the browser
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / 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
5
6 <!-- TMPL_INCLUDE NAME="menus.inc" -->
7 <!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
8
9 <script language="javascript" type="text/javascript">
10 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
11 function isNotNull(f,noalert) {
12         if (f.value.length ==0) {
13                 return false;
14         }
15         return true;
16 }
17 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
18 function toUC(f) {
19         var x=f.value.toUpperCase();
20         f.value=x;
21         return true;
22 }
23 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
24 function isNum(v,maybenull) {
25 var n = new Number(v.value);
26 if (isNaN(n)) {
27         return false;
28         }
29 if (maybenull==0 && v.value=='') {
30         return false;
31 }
32 return true;
33 }
34 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
35 function isDate(f) {
36         var t = Date.parse(f.value);
37         if (isNaN(t)) {
38                 return false;
39         }
40 }
41 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
42 function Check(f) {
43         var ok=1;
44         var _alertString="";
45         var alertString2;
46         if (f.authtypecode.value.length==0) {
47                 _alertString += "\n- " + _("Authority type : code missing");
48         }
49         if (!(isNotNull(window.document.Aform.authtypetext,1))) {
50                 _alertString += "\n- " + _("Description missing");
51         }
52         if (_alertString.length==0) {
53                 document.Aform.submit();
54         } else {
55                 alertString2  = _("Form not submitted because of the following problem(s)");
56                 alertString2 += "\n------------------------------------------------------------------------------------\n";
57                 alertString2 += _alertString;
58                 alert(alertString2);
59         }
60 }
61 </script>
62
63 <!-- TMPL_IF NAME="add_form" -->
64
65         <form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
66         <table>
67                 <!-- TMPL_IF NAME="authtypecode" -->
68                 <caption>Modify authority type</caption>
69         <!-- TMPL_ELSE -->
70                 <caption>Add authority type</caption>
71         <!-- /TMPL_IF -->
72                         <!-- TMPL_IF NAME="authtypecode" -->
73                                 <tr><td><label for="authtypecode">Authority type<label></td><td><input type="hidden" name="op" value="add_validate" />
74                 <input type="hidden" name="checked" value="0" /><input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->" /><!-- TMPL_VAR NAME="authtypecode" --></td></tr>
75                         <!-- TMPL_ELSE -->
76                                 <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>
77                         <!-- /TMPL_IF -->
78                 <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>
79                 <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>
80                 <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>
81         <input type="hidden" name="op" value="add_validate" />
82         <p><input type="submit" value="OK" onclick="Check(this.form); return false;" />
83                         </p>
84         </form>
85 <!-- /TMPL_IF -->
86
87 <!-- TMPL_IF NAME="delete_confirm" -->
88 <div>
89         <h2>Authority structure definition for <!-- TMPL_VAR NAME="authtypetext" --> (<!-- TMPL_VAR NAME="authtypecode" -->)</h2>
90         <!-- TMPL_IF NAME="total" -->
91                 <p>
92                         This record is used <!-- TMPL_VAR NAME="total" --> times
93                 </p>
94         <!-- /TMPL_IF -->
95         <p>CONFIRM DELETION</p>
96         <p>
97                 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
98                         <input type="hidden" name="op" value="delete_confirmed" />
99                         <input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->" />
100                         <input type="submit" value="YES" />
101                 </form>
102                 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
103                         <input type="submit" value="NO" />
104                 </form>
105         </p>
106
107 <!-- /TMPL_IF -->
108
109 <!-- TMPL_IF NAME="else" -->
110 <h1>Auth type Admin</h1>
111 <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>
112 <table>
113         <tr>
114                 <th>Code</th>
115                 <th>Description</th>
116                 <th>Summary</th>
117                 <th>Tag reported</th>
118                 <th>&nbsp;</th>
119                 <th>Edit</th>
120                 <th>Delete</th>
121         </tr>
122         
123         <!-- TMPL_LOOP NAME="loop" -->
124                 <tr>
125                         <td><!-- TMPL_VAR NAME="authtypecode" --></td>
126                         <td><!-- TMPL_VAR NAME="authtypetext" --></td>
127                         <td><!-- TMPL_VAR NAME="summary" --></td>
128                         <td><!-- TMPL_VAR NAME="auth_tag_to_report" --></td>
129                         <td><a href="auth_tag_structure.pl?authtypecode=<!-- TMPL_VAR NAME="authtypecode" -->" class="button parameters" >MARC structure</a></td>
130                         <td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form&amp;authtypecode=<!-- TMPL_VAR NAME="authtypecode" escape="HTML" -->">Edit</a></td>
131                         <td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=delete_confirm&amp;authtypecode=<!-- TMPL_VAR NAME="authtypecode" escape="HTML" -->">Delete</a></td>
132                 </tr>
133         <!-- /TMPL_LOOP -->
134 </table>
135 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
136         <input type="hidden" name="op" value="add_form" />
137         <input type="submit" value="Add authority type" title="Add authority type" alt="Add authority type" />
138         <td width="33%"><!-- TMPL_IF NAME="previous" --><a href="<!-- TMPL_VAR NAME="previous" -->">&lt;&lt; Previous</a><!-- /TMPL_IF --></td>
139         <td width="33%"><!-- TMPL_IF NAME="next" --><a href="<!-- TMPL_VAR NAME="next" -->">Next &gt;&gt;</a><!-- /TMPL_IF --></td>
140 </form>
141
142 <!-- /TMPL_IF -->
143 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->