Fix for Bug 2869, 'do not delete' marc framework tag - reverts to 'default' framework
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / marctagstructure.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Administration &rsaquo;
3 <!-- TMPL_IF name="add_form" -->MARC Frameworks &rsaquo; <!-- TMPL_VAR name="action" --> <!-- TMPL_VAR NAME="searchfield" --><!-- /TMPL_IF -->
4 <!-- TMPL_IF name="delete_confirm" -->MARC Frameworks &rsaquo; Confirm Deletion of Tag '<!-- TMPL_VAR name="searchfield" -->'<!-- /TMPL_IF -->
5 <!-- TMPL_IF name="delete_confirmed" -->MARC Frameworks &rsaquo;  Data Deleted<!-- /TMPL_IF -->
6 <!-- TMPL_IF name="else" -->MARC Frameworks<!-- /TMPL_IF --></title>
7 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
8 <script type="text/javascript">
9 //<![CDATA[
10 function Check(f) {
11     var _alertString="";
12     var alertString2;
13     if (f.tagfield.value.length==0) {
14         _alertString += "\n- " + _("tag number missing");
15     }
16     if (_alertString.length==0) {
17         document.Aform.submit();
18     } else {
19         alertString2  = _("Form not submitted because of the following problem(s)");
20         alertString2 += "\n------------------------------------------------------------------------------------\n";
21         alertString2 += _alertString;
22         alert(alertString2);
23     }
24 }
25
26 $(document).ready(function() {
27     new YAHOO.widget.Button("addtag");
28 });
29 //]]>
30 </script>
31 </head>
32 <body>
33 <!-- TMPL_INCLUDE NAME="header.inc" -->
34 <!-- TMPL_INCLUDE NAME="cat-search.inc" -->
35
36 <div id="breadcrumbs">
37          <a href="/cgi-bin/koha/mainpage.pl">Home</a>
38 &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
39 &rsaquo; <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC Frameworks</a>
40 <!-- TMPL_IF name="add_form" -->
41 &rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=<!-- TMPL_VAR NAME="frameworkcode" -->"><!-- TMPL_VAR NAME="frameworktext" --> (<!-- TMPL_VAR NAME="frameworkcode" -->)</a>
42 &rsaquo; <!-- TMPL_VAR name="action" --> <!-- TMPL_VAR NAME="searchfield" -->
43 <!-- TMPL_ELSIF name="else" -->
44 &rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=<!-- TMPL_VAR NAME="frameworkcode" -->"><!-- TMPL_VAR NAME="frameworktext" --> (<!-- TMPL_VAR NAME="frameworkcode" -->)</a>
45 <!-- TMPL_ELSIF name="delete_confirm" -->
46 &rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=<!-- TMPL_VAR NAME="frameworkcode" -->"><!-- TMPL_VAR NAME="frameworktext" --> (<!-- TMPL_VAR NAME="frameworkcode" -->)</a>
47 &rsaquo; Confirm Deletion of Tag '<!-- TMPL_VAR name="searchfield" -->'
48 <!-- TMPL_ELSIF name="delete_confirmed" -->
49 &rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=<!-- TMPL_VAR NAME="frameworkcode" -->"><!-- TMPL_VAR NAME="frameworktext" --> (<!-- TMPL_VAR NAME="frameworkcode" -->)</a>
50 &rsaquo; Data Deleted
51 <!-- /TMPL_IF -->
52 </div>
53
54 <div id="doc3" class="yui-t2">
55   <div id="bd">
56     <div id="yui-main">
57       <div class="yui-b">
58
59 <!-- TMPL_IF NAME="else" -->
60 <div id="toolbar">
61         <ul class="toolbar">
62         <li><a id="addtag" href="/cgi-bin/koha/admin/marctagstructure.pl?op=add_form&amp;frameworkcode=<!-- TMPL_VAR NAME="frameworkcode" -->">New Tag</a></li>
63 </ul></div><!-- /TMPL_IF -->
64
65 <h1>MARC Framework for <!-- TMPL_IF NAME="frameworkcode" --><!-- TMPL_VAR NAME="frameworktext" --> (<!-- TMPL_VAR NAME="frameworkcode" -->)<!-- TMPL_ELSE -->default MARC framework<!-- /TMPL_IF --></h1>
66
67 <!-- TMPL_IF NAME="add_form" -->
68
69     <form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
70         
71       <fieldset class="rows"><legend><!-- TMPL_IF NAME="use-heading-flags-p" --><!-- TMPL_IF NAME="heading-modify-tag-p" -->Modify tag <input type="hidden" name="modif" value="1" /><!-- TMPL_VAR NAME="searchfield" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="heading-add-tag-p" -->Add tag<!-- /TMPL_IF --><!-- TMPL_ELSE --><!-- TMPL_VAR NAME="action" --><!-- /TMPL_IF --></legend>  <input type="hidden" name="op" value="add_validate" />
72         <input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
73
74         <ol> <li><label for="tagfield">Tag: </label><input id="tagfield" type="text" name="tagfield" value="<!-- TMPL_VAR NAME="searchfield" -->" maxlength="3" size="3" /></li>    
75     <li><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" /></li>
76     <li><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" /></li>
77     <li><label for="repeatable">Repeatable: </label><!-- TMPL_VAR NAME="repeatable" --></li>
78     <li><label for="mandatory">Mandatory: </label><!-- TMPL_VAR NAME="mandatory" --></li>
79     <li><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 authorized value list)</li>
80 </ol></fieldset> 
81     <fieldset class="action">
82         <input type="submit" value="Save Changes" onclick="Check(this.form)" />
83         <a class="cancel" href="<!-- TMPL_VAR NAME="script_name" -->?frameworkcode=<!-- TMPL_VAR NAME="frameworkcode" -->">Cancel</a>
84     </fieldset>
85     </form>
86 <!-- /TMPL_IF -->
87
88
89 <!-- TMPL_IF NAME="delete_confirm" -->
90
91 <div class="dialog alert"><h3>Confirm Deletion of Tag <span class="ex">'<!-- TMPL_VAR NAME="searchfield" -->'</span>?</h3>
92     <p>Tag: <!-- TMPL_VAR NAME="searchfield" --></p>
93     <p>Description: <!-- TMPL_VAR NAME="liblibrarian" --></p>
94     <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
95         <input type="hidden" name="op" value="delete_confirmed" />
96         <input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" /><input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
97         <input type="submit" class="approve" value="Yes, Delete this Tag" /></form>
98         
99         <form action="<!-- TMPL_VAR NAME="script_name" -->" method="get"><input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" /><input type="submit" value="No, Do Not Delete" class="deny" /></form></div>
100 <!-- /TMPL_IF -->
101
102 <!-- TMPL_IF NAME="delete_confirmed" -->
103
104     <div class="dialog message"><h3>Tag Deleted</h3>
105     <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
106     <input type="submit" value="OK" class="approve" />
107     </form></div>
108 <!-- /TMPL_IF -->
109 <!-- TMPL_IF NAME="framework_create" -->
110
111     <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
112         <input type="hidden" name="op" value="framework_create_confirm" />
113         <input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
114         Create framework for <!-- TMPL_VAR NAME="frameworkcode" --> (<!-- TMPL_VAR NAME="frameworktext" -->) using
115         <select name="existingframeworkcode">
116             <option value="">Default</option>
117         <!-- TMPL_LOOP NAME="existingframeworkloop" -->
118             <option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="frameworktext" --></option>
119         <!-- /TMPL_LOOP -->
120         </select>
121         <input type="submit" value="OK" />
122     </form>
123 <!-- /TMPL_IF -->
124
125
126 <!-- TMPL_IF NAME="else" -->
127
128 <form name="f" action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
129     <p><label for="frameworkcode">Framework</label>
130         <select id="frameworkcode" name="frameworkcode">
131             <option value="">Default</option>
132             <!-- TMPL_LOOP NAME="frameworkloop" -->
133                         <!-- TMPL_IF NAME="selected" -->
134                 <option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="frameworktext" --></option>
135                                 <!-- TMPL_ELSE -->
136                 <option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="frameworktext" --></option>
137                                 <!-- /TMPL_IF -->
138             <!-- /TMPL_LOOP -->
139         </select>
140     </p>
141     <p>
142         <label for="searchfield">Search for Tag</label>
143         <input type="text" name="searchfield" id="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
144         <input type="submit" value="Search" />
145     </p>
146     <p>
147         <label for="select_display">Display only used Tags/Subfields</label>
148         <!-- TMPL_IF Name="select_display"-->
149             <input type="checkbox" name="select_display" id="select_display" value="True" checked="checked"  onchange="this.form.submit();" />
150         <!-- TMPL_ELSE -->
151             <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/batchRebuildBiblioTables.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
169     <!-- TMPL_IF NAME="select_display" -->
170         <!-- TMPL_LOOP NAME="loop" -->
171             <!-- TMPL_IF NAME="__odd__" --><tr><!-- TMPL_ELSE --><tr class="highlight"><!-- /TMPL_IF -->
172             <td><!-- TMPL_VAR NAME="tagfield" --></td>
173             <td><!-- TMPL_VAR NAME="liblibrarian" --></td>
174             <td><!-- TMPL_IF NAME="repeatable" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
175             <td><!-- TMPL_IF NAME="mandatory" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
176             <td><!-- TMPL_VAR NAME="authorised_value" --></td>
177             <td><a href="<!-- TMPL_VAR NAME="subfield_link" -->">subfields</a></td>
178             <td><a href="<!-- TMPL_VAR NAME="edit" -->">Edit</a></td>
179             <td><a href="<!-- TMPL_VAR NAME="delete" -->">Delete</a></td>
180         </tr>
181       <!-- TMPL_IF NAME="__odd__" --><tr><!-- TMPL_ELSE --><tr class="highlight"><!-- /TMPL_IF -->
182             <td>&nbsp;</td>
183             <td colspan="7">
184                 <!-- TMPL_LOOP NAME="subfields" -->
185                     <p> Tab:<!-- TMPL_VAR NAME="tab" --> | $<!-- TMPL_VAR NAME="tagsubfield" -->
186                             <!-- 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 -->
187                     </p>
188                 <!-- /TMPL_LOOP -->
189             </td>
190         </tr>
191         <!-- /TMPL_LOOP -->
192     <!-- TMPL_ELSE -->
193     <!-- TMPL_LOOP NAME="loop" -->
194     <!-- TMPL_IF NAME="__odd__" --><tr><!-- TMPL_ELSE --><tr class="highlight"><!-- /TMPL_IF -->
195         <td><!-- TMPL_VAR NAME="tagfield" --></td>
196         <td><!-- TMPL_VAR NAME="liblibrarian" --></td>
197         <td><!-- TMPL_IF NAME="repeatable" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
198         <td><!-- TMPL_IF NAME="mandatory" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
199         <td><!-- TMPL_VAR NAME="authorised_value" --></td>
200         <td><a href="<!-- TMPL_VAR NAME="subfield_link" -->">Subfields</a></td>
201         <td><a href="<!-- TMPL_VAR NAME="edit" -->">Edit</a></td>
202         <td><a href="<!-- TMPL_VAR NAME="delete" -->">Delete</a></td>
203     </tr>
204     <!-- /TMPL_LOOP -->
205     <!--/TMPL_IF -->
206     </table>
207
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 -->
211
212     <!-- TMPL_IF NAME="nextpage" -->
213     <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>
214     <!-- /TMPL_IF -->
215
216 <!-- /TMPL_IF -->
217
218
219     </div>
220   </div>
221 <div class="yui-b">
222 <!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
223 </div>
224 </div>
225 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->