Moving inline script blocks to <head> where possible
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / marctagstructure.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; System Administration &rsaquo;
3 <!-- TMPL_IF name="add_form" --><!-- TMPL_VAR name="action" --><!-- /TMPL_IF -->
4 <!-- TMPL_IF name="delete_confirm" -->Confirm Deletion of Tag '<!-- TMPL_VAR name="searchfield" -->'<!-- /TMPL_IF -->
5 <!-- TMPL_IF name="delete_confirmed" -->Data Deleted<!-- /TMPL_IF -->
6 <!-- TMPL_IF name="else" -->MARC tag Structure<!-- /TMPL_IF --></title>
7 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
8 <script type="text/javascript">
9     /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
10     function isNotNull(f,noalert) {
11         if (f.value.length ==0) {
12                         return false;
13         }
14         return true;
15     }
16     /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
17     function toUC(f) {
18         var x=f.value.toUpperCase();
19         f.value=x;
20         return true;
21     }
22     /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
23     function isNum(v,maybenull) {
24     var n = new Number(v.value);
25     if (isNaN(n)) {
26         return false;
27         }
28     if (maybenull==0 && v.value=='') {
29         return false;
30     }
31     return true;
32     }
33     /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
34     function isDate(f) {
35         var t = Date.parse(f.value);
36         if (isNaN(t)) {
37             return false;
38         }
39     }
40     /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
41     function Check(f) {
42         var ok=1;
43         var _alertString="";
44         var alertString2;
45         if (f.tagfield.value.length==0) {
46             _alertString += "\n- " + _("tag number missing");
47         }
48         if (_alertString.length==0) {
49             document.Aform.submit();
50         } else {
51             alertString2  = _("Form not submitted because of the following problem(s)");
52             alertString2 += "\n------------------------------------------------------------------------------------\n";
53             alertString2 += _alertString;
54             alert(alertString2);
55         }
56     }
57     </script>
58 </head>
59 <body>
60 <!-- TMPL_INCLUDE NAME="header.inc" -->
61
62 <!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
63
64 <div id="doc3" class="yui-t2">
65    
66    <div id="bd">
67         <div id="yui-main">
68         <div class="yui-b"><div class="yui-g">
69
70 <h1>MARC tag structure admin for <!-- TMPL_IF NAME="frameworkcode" --><!-- TMPL_VAR NAME="frameworktext" --> (<!-- TMPL_VAR NAME="frameworkcode" -->)<!-- TMPL_ELSE -->default MARC framework<!-- /TMPL_IF --></h1>
71
72
73 <!-- TMPL_IF NAME="add_form" -->
74 <!-- ------------------------------------------------------------------------ -->
75     <form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
76         <input type="hidden" name="op" value="add_validate" />
77         <input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
78         <h2><!-- TMPL_IF NAME="use-heading-flags-p" --><!-- TMPL_IF NAME="heading-modify-tag-p" -->Modify tag<!-- /TMPL_IF --><!-- TMPL_IF NAME="heading-add-tag-p" -->Add tag<!-- /TMPL_IF --><!-- TMPL_ELSE --><!-- TMPL_VAR NAME="action" --><!-- /TMPL_IF --></h2>
79          <p><label>Tag</label><input id="tagfield" type="text" name="tagfield" value="<!-- TMPL_VAR NAME="searchfield" -->" maxlength="3" size="3" /></p>    
80     <p><label for="liblibrarian">Label for lib</label><input type="text" id="liblibrarian" name="liblibrarian" value="<!-- TMPL_VAR NAME="liblibrarian" ESCAPE="HTML" -->" size="40" maxlength="100" /></p>
81     <p><label for="libopac">Label for opac</label><input type="text" id="libopac" name="libopac" value="<!-- TMPL_VAR NAME="libopac" ESCAPE="HTML" -->" size="40" maxlength="100" /></p>
82     <p><label for="repeatable">Repeatable</label><!-- TMPL_VAR NAME="repeatable" -->&nbsp;</p>
83     <p><label for="mandatory">Mandatory</label><!-- TMPL_VAR NAME="mandatory" -->&nbsp;</p>
84     <p><label for="authorised_value">Authorized value</label><!-- TMPL_VAR NAME="authorised_value" --> (if you select a value here, the indicators will be limited to the authorised value list)</p>
85         <p>
86             <input type="submit" value="Save Changes" onclick="Check(this.form)" />
87             <input type="submit" value="Cancel and Return to MARC Tag Structure" onclick="location.href='<!-- TMPL_VAR NAME="script_name" -->?frameworkcode=<!-- TMPL_VAR NAME="frameworkcode" -->'; return false;" />
88         </p>
89     </form>
90 <!-- /TMPL_IF -->
91
92
93 <!-- TMPL_IF NAME="delete_confirm" -->
94 <!-- ------------------------------------------------------------------------ -->
95 <table>
96 <caption>Confirm Deletion of Tag <em><!-- TMPL_VAR NAME="searchfield" --></em>?</caption>
97     <p>Tag: <!-- TMPL_VAR NAME="searchfield" --></p>
98     <p>Description: <!-- TMPL_VAR NAME="liblibrarian" --></p>
99     </table>
100     <form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="hidden" name="op" value="delete_confirmed"><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" /><input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" /> <input type="submit" value="Yes, Delete this Tag" /></form> <form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="No, Do Not Delete" /></form>
101 <!-- /TMPL_IF -->
102
103 <!-- TMPL_IF NAME="delete_confirmed" -->
104 <!-- ------------------------------------------------------------------------ -->
105     <div class="details"><h3>Tag Deleted</h3>
106     <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
107     <input type="submit" value="Return to MARC Tag Structure" />
108     </form>
109 <!-- /TMPL_IF -->
110 <!-- TMPL_IF NAME="framework_create" -->
111 <!-- ------------------------------------------------------------------------ -->
112     <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
113         <input type="hidden" name="op" value="framework_create_confirm" />
114         <input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
115         Create framework for <!-- TMPL_VAR NAME="frameworkcode" --> (<!-- TMPL_VAR NAME="frameworktext" -->) using
116         <select name="existingframeworkcode">
117             <option value="">Default</option>
118         <!-- TMPL_LOOP NAME="existingframeworkloop" -->
119             <option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="frameworktext" --></option>
120         <!-- /TMPL_LOOP -->
121         </select>
122         <input type="submit" value="OK" />
123     </form>
124 <!-- /TMPL_IF -->
125
126 <!-- ------------------------------------------------------------------------ -->
127 <!-- TMPL_IF NAME="else" -->
128
129 <form name="f" action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
130     <p><label for="frameworkcode">Framework</label>
131         <select id="frameworkcode" name="frameworkcode">
132             <option value="">Default</option>
133             <!-- TMPL_LOOP NAME="frameworkloop" -->
134                         <!-- TMPL_IF NAME="selected" -->
135                 <option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="frameworktext" --></option>
136                                 <!-- TMPL_ELSE -->
137                 <option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="frameworktext" --></option>
138                                 <!-- /TMPL_IF -->
139             <!-- /TMPL_LOOP -->
140         </select>
141     </p>
142     <p>
143         <label for="searchfield">Search for Tag</label>
144         <input type="text" name="searchfield" id="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
145         <input type="submit" value="Search" />
146     </p>
147     <p>
148         <!-- TMPL_IF Name="select_display"-->
149             <label for="select_display">Display only used Tags/Subfields</label> <input type="checkbox" name="select_display" id="select_display" value="True" checked="checked"  onchange="this.form.submit();" />
150         <!-- TMPL_ELSE -->
151             <label for="select_display">Display only used Tags/Subfields</label> <input type="checkbox" name="select_display" id="select_display" value="True" onchange="this.form.submit();" />
152         <!--/TMPL_IF -->
153     </p>
154 </form>
155 <p>NOTE : if you change the link between a MARC subfield and a non-MARC field, ask your administrator to run misc/rebuildnonmarc.pl script.</p>
156
157     <table>
158     <tr>
159         <th>Tag</th>
160         <th>Lib</th>
161         <th>Repeatable</th>
162         <th>Mandatory</th>
163         <th>Auth value</th>
164         <th>Subfields</th>
165         <th>Edit</th>
166         <th>Delete</th>
167                 <tr>
168     <!-- TMPL_IF NAME="select_display" -->
169         <!-- TMPL_LOOP NAME="loop" -->
170             <!-- TMPL_IF NAME="toggle" --><tr><!-- TMPL_ELSE --><tr class="highlight"><!-- /TMPL_IF -->
171             <td><!-- TMPL_VAR NAME="tagfield" --></td>
172             <td><!-- TMPL_VAR NAME="liblibrarian" --></td>
173             <td><!-- TMPL_IF NAME="repeatable" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
174             <td><!-- TMPL_IF NAME="mandatory" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
175             <td><!-- TMPL_VAR NAME="authorised_value" --></td>
176             <td><a href="<!-- TMPL_VAR NAME="subfield_link" -->">subfields</a></td>
177             <td><a href="<!-- TMPL_VAR NAME="edit" -->">Edit</a></td>
178             <td><a href="<!-- TMPL_VAR NAME="delete" -->">Delete</a></td>
179         </tr>
180             <!-- TMPL_IF NAME="toggle" --><tr><!-- TMPL_ELSE --><tr class="highlight"><!-- /TMPL_IF -->
181             <td>
182                 &nbsp;
183             </td>
184             <td colspan="7">
185                 <!-- TMPL_LOOP NAME="subfields" -->
186                     <p> Tab:<!-- TMPL_VAR NAME="tab" --> | $<!-- TMPL_VAR NAME="tagsubfield" -->
187                             <!-- TMPL_VAR NAME="liblibrarian" --> <!-- TMPL_IF NAME="kohafield" --><!-- TMPL_VAR NAME="kohafield" --><!--/TMPL_IF --><!-- TMPL_IF NAME="repeatable" -->, repeatable<!-- /TMPL_IF --><!-- TMPL_IF NAME="mandatory" -->, Mandatory<!-- /TMPL_IF --><!-- TMPL_IF NAME="seealso" -->, See <!-- TMPL_VAR name="seealso" --><!--/TMPL_IF --><!-- TMPL_IF NAME="authorised_value" -->, <!-- TMPL_VAR NAME="authorised_value" --><!--/TMPL_IF --><!-- TMPL_IF NAME="authtypecode" -->, <!-- TMPL_VAR NAME="authtypecode" --><!--/TMPL_IF --><!-- TMPL_IF NAME="value_builder" -->, <!-- TMPL_VAR NAME="value_builder" --><!--/TMPL_IF -->
188                     </p>
189                 <!-- /TMPL_LOOP -->
190             </td>
191         </tr>
192         <!-- /TMPL_LOOP -->
193     <!-- TMPL_ELSE -->
194     <!-- TMPL_LOOP NAME="loop" -->
195     <!-- TMPL_IF NAME="toggle" --><tr><!-- TMPL_ELSE --><tr class="highlight"><!-- /TMPL_IF -->
196         <td><!-- TMPL_VAR NAME="tagfield" --></td>
197         <td><!-- TMPL_VAR NAME="liblibrarian" --></td>
198         <td><!-- TMPL_IF NAME="repeatable" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
199         <td><!-- TMPL_IF NAME="mandatory" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
200         <td><!-- TMPL_VAR NAME="authorised_value" --></td>
201         <td><a href="<!-- TMPL_VAR NAME="subfield_link" -->">Subfields</a></td>
202         <td><a href="<!-- TMPL_VAR NAME="edit" -->">Edit</a></td>
203         <td><a href="<!-- TMPL_VAR NAME="delete" -->">Delete</a></td>
204     </tr>
205     <!-- /TMPL_LOOP -->
206     <!--/TMPL_IF -->
207     </table>
208     <!-- TMPL_IF NAME="isprevpage" -->
209             <a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="prevpage" -->&amp;searchfield=<!-- TMPL_VAR NAME="searchfield" -->&amp;frameworkcode=<!-- TMPL_VAR NAME="frameworkcode" --><!--TMPL_IF Name="select_display"-->&amp;select_display=True<!--/TMPL_IF -->">&lt;&lt; Previous</a>
210         <!-- /TMPL_IF --><form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
211     <input type="hidden" name="op" value="add_form" />
212     <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
213         <input type="hidden" name="op" value="add_form" />
214         <input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield"-->" />
215     <input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
216         <input type="submit" value="Add Tag" />
217     </form>
218         <!-- TMPL_IF NAME="nextpage" -->
219             <a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="nextpage" -->&amp;searchfield=<!-- TMPL_VAR NAME="searchfield" -->&amp;frameworkcode=<!-- TMPL_VAR NAME="frameworkcode" --><!--TMPL_IF Name="select_display"-->&amp;select_display=True<!--/TMPL_IF -->">Next &gt;&gt;</a>
220         <!-- /TMPL_IF -->
221
222 <!-- /TMPL_IF -->
223
224
225 </div>
226 </div>
227 </div>
228
229 <!-- TMPL_INCLUDE NAME="mainmenu.inc" -->
230 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->