Bug 10452: make AllowHoldsOnDamagedItems control using damaged items to fulfill holds
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / marctagstructure.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Administration &rsaquo;
3 [% IF ( add_form ) %]MARC frameworks &rsaquo; [% action %] [% searchfield %][% END %]
4 [% IF ( delete_confirm ) %]MARC frameworks &rsaquo; Confirm deletion of tag '[% searchfield %]'[% END %]
5 [% IF ( delete_confirmed ) %]MARC frameworks &rsaquo;  Data deleted[% END %]
6 [% IF ( else ) %]MARC frameworks[% END %]</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
9 [% INCLUDE 'datatables.inc' %]
10
11 <script type="text/javascript">
12 //<![CDATA[
13
14 $(document).ready(function() {
15     $("#table_marctagstructure").dataTable($.extend(true, {}, dataTablesDefaults, {
16         "aoColumnDefs": [
17             { "aTargets": [ -1, -2, -3 ], "bSortable": false, "bSearchable": false },
18         ],
19         "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
20         "iDisplayLength": 20,
21         "sPaginationType": "four_button"
22     }));
23 });
24
25 //]]>
26 </script>
27 </head>
28 <body id="admin_marctagstructure" class="admin">
29 [% INCLUDE 'header.inc' %]
30 [% INCLUDE 'cat-search.inc' %]
31
32 <div id="breadcrumbs">
33          <a href="/cgi-bin/koha/mainpage.pl">Home</a>
34 &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
35 &rsaquo; <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a>
36 [% IF ( add_form ) %]
37 &rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode %]">[% frameworktext %] ([% frameworkcode %])</a>
38 &rsaquo; [% action %] [% searchfield %]
39 [% ELSIF ( else ) %]
40 &rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode %]">[% IF ( frameworkcode ) %][% frameworktext %] ([% frameworkcode %])[% ELSE %]Default MARC framework[% END %]</a>
41 [% ELSIF ( delete_confirm ) %]
42 &rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode %]">[% frameworktext %] ([% frameworkcode %])</a>
43 &rsaquo; Confirm deletion of tag '[% searchfield %]'
44 [% ELSIF ( delete_confirmed ) %]
45 &rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode %]">[% frameworktext %] ([% frameworkcode %])</a>
46 &rsaquo; Data deleted
47 [% END %]
48 </div>
49
50 <div id="doc3" class="yui-t2">
51   <div id="bd">
52     <div id="yui-main">
53       <div class="yui-b">
54
55 [% IF ( else ) %]
56 <div id="toolbar" class="btn-toolbar">
57     <a class="btn btn-small" id="addtag" href="/cgi-bin/koha/admin/marctagstructure.pl?op=add_form&amp;frameworkcode=[% frameworkcode %]"><i class="icon-plus"></i> New tag</a>
58 </div>[% END %]
59
60 <h1>MARC Framework for [% IF ( frameworkcode ) %][% frameworktext %] ([% frameworkcode %])[% ELSE %]default MARC framework[% END %]</h1>
61
62 [% IF ( add_form ) %]
63
64     <form action="[% script_name %]" name="Aform" method="post" class="validated">
65         
66       <fieldset class="rows"><legend>[% IF ( use_heading_flags_p ) %][% IF ( heading_modify_tag_p ) %]Modify tag <input type="hidden" name="modif" value="1" />[% searchfield %][% END %][% IF ( heading_add_tag_p ) %]Add tag[% END %][% ELSE %][% action %][% END %]</legend>  <input type="hidden" name="op" value="add_validate" />
67         <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
68
69     <ol> <li><label for="tagfield" class="required">Tag: </label><input id="tagfield" type="text" name="tagfield" value="[% searchfield %]" maxlength="3" size="3" required="required" class="required" /> <span class="required">Required</span></li>
70     <li><label for="liblibrarian">Label for lib: </label><input type="text" id="liblibrarian" name="liblibrarian" value="[% liblibrarian |html %]" size="40" maxlength="100" /></li>
71     <li><label for="libopac">Label for opac: </label><input type="text" id="libopac" name="libopac" value="[% libopac |html %]" size="40" maxlength="100" /></li>
72     <li><label for="repeatable">Repeatable: </label>
73         [% IF ( repeatable ) %]
74             <input type="checkbox" name="repeatable" id="repeatable" value="1" checked="checked" />
75         [% ELSE %]
76             <input type="checkbox" name="repeatable" id="repeatable" value="1" />
77         [% END %]
78     </li>
79     <li><label for="mandatory">Mandatory: </label>
80         [% IF ( mandatory ) %]
81             <input type="checkbox" name="mandatory" id="mandatory" value="1" checked="checked" />
82         [% ELSE %]
83             <input type="checkbox" name="mandatory" id="mandatory" value="1" />
84         [% END %]
85     </li>
86     <li><label for="authorised_value">Authorized value: </label>[% authorised_value %] (if you select a value here, the indicators will be limited to the authorized value list)</li>
87 </ol></fieldset> 
88     <fieldset class="action">
89         <input type="submit" value="Save changes" />
90         <a class="cancel" href="[% script_name %]?frameworkcode=[% frameworkcode %]">Cancel</a>
91     </fieldset>
92     </form>
93 [% END %]
94
95
96 [% IF ( delete_confirm ) %]
97
98 <div class="dialog alert"><h3>Confirm deletion of tag <span class="ex">'[% searchfield %]'</span>?</h3>
99     <p>Tag: [% searchfield %]</p>
100     <p>Description: [% liblibrarian %]</p>
101     <form action="[% script_name %]" method="post">
102         <input type="hidden" name="op" value="delete_confirmed" />
103         <input type="hidden" name="searchfield" value="[% searchfield %]" /><input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
104         <input type="submit" class="approve" value="Yes, Delete this Tag" /></form>
105         
106         <form action="[% script_name %]" method="get"><input type="hidden" name="frameworkcode" value="[% frameworkcode %]" /><input type="submit" value="No, Do Not Delete" class="deny" /></form></div>
107 [% END %]
108
109 [% IF ( delete_confirmed ) %]
110
111     <div class="dialog message"><h3>Tag deleted</h3>
112     <form action="[% script_name %]" method="post"><input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
113     <input type="submit" value="OK" class="approve" />
114     </form></div>
115 [% END %]
116 [% IF ( framework_create ) %]
117
118     <form action="[% script_name %]" method="post">
119         <input type="hidden" name="op" value="framework_create_confirm" />
120         <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
121         Create framework for [% frameworkcode %] ([% frameworktext %]) using
122         <select name="existingframeworkcode">
123             <option value="">Default</option>
124         [% FOREACH existingframeworkloo IN existingframeworkloop %]
125             <option value="[% existingframeworkloo.value %]">[% existingframeworkloo.frameworktext %]</option>
126         [% END %]
127         </select>
128         <input type="submit" value="OK" />
129     </form>
130 [% END %]
131
132
133 [% IF ( else ) %]
134 <form name="f" action="[% script_name %]" method="post">
135 <fieldset style="padding:.5em;">
136         <label for="searchfield"><strong>Search for tag:</strong> </label>
137         <input type="text" name="searchfield" id="searchfield" size="4" value="[% searchfield %]" />
138
139 <label for="frameworkcode"><strong>In framework:</strong> </label>
140         <select id="frameworkcode" name="frameworkcode">
141             <option value="">Default</option>
142             [% FOREACH frameworkloo IN frameworkloop %]
143             [% IF ( frameworkloo.selected ) %]
144                 <option value="[% frameworkloo.value %]" selected="selected">[% frameworkloo.frameworktext %]</option>
145                 [% ELSE %]
146                 <option value="[% frameworkloo.value %]">[% frameworkloo.frameworktext %]</option>
147                 [% END %]
148             [% END %]
149         </select>
150     <input type="submit" value="Search" />
151 <p>        <label for="select_display">Display only used tags/subfields</label>
152         [% IF ( select_display ) %]
153             <input type="checkbox" name="select_display" id="select_display" value="True" checked="checked"  onchange="this.form.submit();" />
154         [% ELSE %]
155             <input type="checkbox" name="select_display" id="select_display" value="True" onchange="this.form.submit();" />
156         [% END %]</p>
157 </fieldset>
158 </form>
159
160     <table id="table_marctagstructure">
161     <thead>
162         <tr>
163         <th>Tag</th>
164         <th>Lib</th>
165         <th>Repeatable</th>
166         <th>Mandatory</th>
167         <th>Auth value</th>
168         <th>Subfields</th>
169         <th>Edit</th>
170         <th>Delete</th>
171         </tr>
172         </thead>
173     <tbody>
174     [% IF ( select_display ) %]
175         [% FOREACH loo IN loop %]
176             [% IF ( loop.odd ) %]<tr>[% ELSE %]<tr class="highlight">[% END %]
177             <td>[% loo.tagfield %]</td>
178             <td>[% loo.liblibrarian %]</td>
179             <td>[% IF ( loo.repeatable ) %]Yes[% ELSE %]No[% END %]</td>
180             <td>[% IF ( loo.mandatory ) %]Yes[% ELSE %]No[% END %]</td>
181             <td>[% loo.authorised_value %]</td>
182             <td><a href="[% loo.subfield_link %]">subfields</a></td>
183             <td><a href="[% loo.edit %]">Edit</a></td>
184             <td><a href="[% loo.delete %]">Delete</a></td>
185         </tr>
186       [% IF ( loop.odd ) %]<tr>[% ELSE %]<tr class="highlight">[% END %]
187             <td>&nbsp;</td>
188             <td colspan="7">
189                 [% FOREACH subfield IN loo.subfields %]
190                     <p> Tab:[% subfield.tab %] | $[% subfield.tagsubfield %]
191                             [% subfield.liblibrarian %] [% IF ( subfield.kohafield ) %][% subfield.kohafield %][% END %][% IF ( subfield.repeatable ) %], repeatable[% END %][% IF ( subfield.mandatory ) %], Mandatory[% END %][% IF ( subfield.seealso ) %], See [% subfield.seealso %][% END %][% IF ( subfield.authorised_value ) %], [% subfield.authorised_value %][% END %][% IF ( subfield.authtypecode ) %], [% subfield.authtypecode %][% END %][% IF ( subfield.value_builder ) %], [% subfield.value_builder %][% END %]
192                     </p>
193                 [% END %]
194             </td>
195         </tr>
196         [% END %]
197     [% ELSE %]
198     [% FOREACH loo IN loop %]
199     [% IF ( loop.odd ) %]<tr>[% ELSE %]<tr class="highlight">[% END %]
200         <td>[% loo.tagfield %]</td>
201         <td>[% loo.liblibrarian %]</td>
202         <td>[% IF ( loo.repeatable ) %]Yes[% ELSE %]No[% END %]</td>
203         <td>[% IF ( loo.mandatory ) %]Yes[% ELSE %]No[% END %]</td>
204         <td>[% loo.authorised_value %]</td>
205         <td><a href="[% loo.subfield_link %]">Subfields</a></td>
206         <td><a href="[% loo.edit %]">Edit</a></td>
207         <td><a href="[% loo.delete %]">Delete</a></td>
208     </tr>
209     [% END %]
210     [% END %]
211     </tbody>
212     </table>
213
214
215
216 [% END %]
217
218
219     </div>
220   </div>
221 <div class="yui-b">
222 [% INCLUDE 'admin-menu.inc' %]
223 </div>
224 </div>
225 [% INCLUDE 'intranet-bottom.inc' %]