Bug 766: Remove CGI::scrollinglist from marctagstructure.pl
[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         "sPaginationType": "four_button"
20     }));
21 });
22
23 //]]>
24 </script>
25 </head>
26 <body id="admin_marctagstructure" class="admin">
27 [% INCLUDE 'header.inc' %]
28 [% INCLUDE 'cat-search.inc' %]
29
30 <div id="breadcrumbs">
31          <a href="/cgi-bin/koha/mainpage.pl">Home</a>
32 &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
33 &rsaquo; <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a>
34 [% IF ( add_form ) %]
35 &rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode %]">[% frameworktext %] ([% frameworkcode %])</a>
36 &rsaquo; [% action %] [% searchfield %]
37 [% ELSIF ( else ) %]
38 &rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode %]">[% IF ( frameworkcode ) %][% frameworktext %] ([% frameworkcode %])[% ELSE %]Default MARC framework[% END %]</a>
39 [% ELSIF ( delete_confirm ) %]
40 &rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode %]">[% frameworktext %] ([% frameworkcode %])</a>
41 &rsaquo; Confirm deletion of tag '[% searchfield %]'
42 [% ELSIF ( delete_confirmed ) %]
43 &rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode %]">[% frameworktext %] ([% frameworkcode %])</a>
44 &rsaquo; Data deleted
45 [% END %]
46 </div>
47
48 <div id="doc3" class="yui-t2">
49   <div id="bd">
50     <div id="yui-main">
51       <div class="yui-b">
52
53 [% IF ( else ) %]
54 <div id="toolbar" class="btn-toolbar">
55     <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>
56 </div>[% END %]
57
58 <h1>MARC Framework for [% IF ( frameworkcode ) %][% frameworktext %] ([% frameworkcode %])[% ELSE %]default MARC framework[% END %]</h1>
59
60 [% IF ( add_form ) %]
61
62     <form action="[% script_name %]" name="Aform" method="post" class="validated">
63         
64       <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" />
65         <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
66
67         <ol>
68             <li>
69                 [% IF ( heading_modify_tag_p ) %]
70                     <input type="hidden" name="tagfield" value="[% searchfield %]" />
71                     <span class="label">Tag:</span>
72                     [% searchfield %]
73                 [% ELSE %]
74                     <label for="tagfield" class="required">Tag: </label>
75                     <input id="tagfield" type="text" name="tagfield" value="[% searchfield %]" maxlength="3" size="3" required="required" class="required" />
76                     <span class="required">Required</span>
77                 [% END %]
78             </li>
79     <li><label for="liblibrarian">Label for lib: </label><input type="text" id="liblibrarian" name="liblibrarian" value="[% liblibrarian |html %]" size="40" maxlength="100" /></li>
80     <li><label for="libopac">Label for opac: </label><input type="text" id="libopac" name="libopac" value="[% libopac |html %]" size="40" maxlength="100" /></li>
81     <li><label for="repeatable">Repeatable: </label>
82         [% IF ( repeatable ) %]
83             <input type="checkbox" name="repeatable" id="repeatable" value="1" checked="checked" />
84         [% ELSE %]
85             <input type="checkbox" name="repeatable" id="repeatable" value="1" />
86         [% END %]
87     </li>
88     <li><label for="mandatory">Mandatory: </label>
89         [% IF ( mandatory ) %]
90             <input type="checkbox" name="mandatory" id="mandatory" value="1" checked="checked" />
91         [% ELSE %]
92             <input type="checkbox" name="mandatory" id="mandatory" value="1" />
93         [% END %]
94     </li>
95     <li><label for="authorised_value">Authorized value: </label>
96         <select name="authorised_value" id="authorised_value" size="1">
97         [% FOREACH value IN authorised_value.values %]
98         [% IF ( value == authorised_value.default ) %]
99             <option value="[% value %]" selected="selected">[% value %]</option>
100         [% ELSE %]
101             <option value="[% value %]">[% value %]</option>
102         [% END %]
103         [% END %]
104         </select>
105         (if you select a value here, the indicators will be limited to the authorized value list)</li>
106 </ol></fieldset> 
107     <fieldset class="action">
108         <input type="submit" value="Save changes" />
109         <a class="cancel" href="[% script_name %]?frameworkcode=[% frameworkcode %]">Cancel</a>
110     </fieldset>
111     </form>
112 [% END %]
113
114
115 [% IF ( delete_confirm ) %]
116
117 <div class="dialog alert"><h3>Confirm deletion of tag <span class="ex">'[% searchfield %]'</span>?</h3>
118     <p>Tag: [% searchfield %]</p>
119     <p>Description: [% liblibrarian %]</p>
120     <form action="[% script_name %]" method="post">
121         <input type="hidden" name="op" value="delete_confirmed" />
122         <input type="hidden" name="searchfield" value="[% searchfield %]" /><input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
123         <input type="submit" class="approve" value="Yes, Delete this Tag" /></form>
124         
125         <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>
126 [% END %]
127
128 [% IF ( delete_confirmed ) %]
129
130     <div class="dialog message"><h3>Tag deleted</h3>
131     <form action="[% script_name %]" method="post"><input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
132     <input type="submit" value="OK" class="approve" />
133     </form></div>
134 [% END %]
135 [% IF ( framework_create ) %]
136
137     <form action="[% script_name %]" method="post">
138         <input type="hidden" name="op" value="framework_create_confirm" />
139         <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
140         Create framework for [% frameworkcode %] ([% frameworktext %]) using
141         <select name="existingframeworkcode">
142             <option value="">Default</option>
143         [% FOREACH existingframeworkloo IN existingframeworkloop %]
144             <option value="[% existingframeworkloo.value %]">[% existingframeworkloo.frameworktext %]</option>
145         [% END %]
146         </select>
147         <input type="submit" value="OK" />
148     </form>
149 [% END %]
150
151
152 [% IF ( else ) %]
153 <form name="f" action="[% script_name %]" method="post">
154 <fieldset style="padding:.5em;">
155         <label for="searchfield"><strong>Search for tag:</strong> </label>
156         <input type="text" name="searchfield" id="searchfield" size="4" value="[% searchfield %]" />
157
158 <label for="frameworkcode"><strong>In framework:</strong> </label>
159         <select id="frameworkcode" name="frameworkcode">
160             <option value="">Default</option>
161             [% FOREACH frameworkloo IN frameworkloop %]
162             [% IF ( frameworkloo.selected ) %]
163                 <option value="[% frameworkloo.value %]" selected="selected">[% frameworkloo.frameworktext %]</option>
164                 [% ELSE %]
165                 <option value="[% frameworkloo.value %]">[% frameworkloo.frameworktext %]</option>
166                 [% END %]
167             [% END %]
168         </select>
169     <input type="submit" value="Search" />
170 <p>        <label for="select_display">Display only used tags/subfields</label>
171         [% IF ( select_display ) %]
172             <input type="checkbox" name="select_display" id="select_display" value="True" checked="checked"  onchange="this.form.submit();" />
173         [% ELSE %]
174             <input type="checkbox" name="select_display" id="select_display" value="True" onchange="this.form.submit();" />
175         [% END %]</p>
176 </fieldset>
177 </form>
178
179     <table id="table_marctagstructure">
180     <thead>
181         <tr>
182         <th>Tag</th>
183         <th>Lib</th>
184         <th>Repeatable</th>
185         <th>Mandatory</th>
186         <th>Auth value</th>
187         <th>Subfields</th>
188         <th>Edit</th>
189         <th>Delete</th>
190         </tr>
191         </thead>
192     <tbody>
193     [% IF ( select_display ) %]
194         [% FOREACH loo IN loop %]
195             [% IF ( loop.odd ) %]<tr>[% ELSE %]<tr class="highlight">[% END %]
196             <td>[% loo.tagfield %]</td>
197             <td>[% loo.liblibrarian %]</td>
198             <td>[% IF ( loo.repeatable ) %]Yes[% ELSE %]No[% END %]</td>
199             <td>[% IF ( loo.mandatory ) %]Yes[% ELSE %]No[% END %]</td>
200             <td>[% loo.authorised_value %]</td>
201             <td><a href="[% loo.subfield_link %]">subfields</a></td>
202             <td><a href="[% loo.edit %]">Edit</a></td>
203             <td><a href="[% loo.delete %]">Delete</a></td>
204         </tr>
205       [% IF ( loop.odd ) %]<tr>[% ELSE %]<tr class="highlight">[% END %]
206             <td>&nbsp;</td>
207             <td colspan="7">
208                 [% FOREACH subfield IN loo.subfields %]
209                     <p> Tab:[% subfield.tab %] | $[% subfield.tagsubfield %]
210                             [% 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 %]
211                     </p>
212                 [% END %]
213             </td>
214         </tr>
215         [% END %]
216     [% ELSE %]
217     [% FOREACH loo IN loop %]
218     [% IF ( loop.odd ) %]<tr>[% ELSE %]<tr class="highlight">[% END %]
219         <td>[% loo.tagfield %]</td>
220         <td>[% loo.liblibrarian %]</td>
221         <td>[% IF ( loo.repeatable ) %]Yes[% ELSE %]No[% END %]</td>
222         <td>[% IF ( loo.mandatory ) %]Yes[% ELSE %]No[% END %]</td>
223         <td>[% loo.authorised_value %]</td>
224         <td><a href="[% loo.subfield_link %]">Subfields</a></td>
225         <td><a href="[% loo.edit %]">Edit</a></td>
226         <td><a href="[% loo.delete %]">Delete</a></td>
227     </tr>
228     [% END %]
229     [% END %]
230     </tbody>
231     </table>
232
233
234
235 [% END %]
236
237
238     </div>
239   </div>
240 <div class="yui-b">
241 [% INCLUDE 'admin-menu.inc' %]
242 </div>
243 </div>
244 [% INCLUDE 'intranet-bottom.inc' %]