Bug 7308: (follow-up) change color style for fund child
[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> <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>
68     <li><label for="liblibrarian">Label for lib: </label><input type="text" id="liblibrarian" name="liblibrarian" value="[% liblibrarian |html %]" size="40" maxlength="100" /></li>
69     <li><label for="libopac">Label for opac: </label><input type="text" id="libopac" name="libopac" value="[% libopac |html %]" size="40" maxlength="100" /></li>
70     <li><label for="repeatable">Repeatable: </label>
71         [% IF ( repeatable ) %]
72             <input type="checkbox" name="repeatable" id="repeatable" value="1" checked="checked" />
73         [% ELSE %]
74             <input type="checkbox" name="repeatable" id="repeatable" value="1" />
75         [% END %]
76     </li>
77     <li><label for="mandatory">Mandatory: </label>
78         [% IF ( mandatory ) %]
79             <input type="checkbox" name="mandatory" id="mandatory" value="1" checked="checked" />
80         [% ELSE %]
81             <input type="checkbox" name="mandatory" id="mandatory" value="1" />
82         [% END %]
83     </li>
84     <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>
85 </ol></fieldset> 
86     <fieldset class="action">
87         <input type="submit" value="Save changes" />
88         <a class="cancel" href="[% script_name %]?frameworkcode=[% frameworkcode %]">Cancel</a>
89     </fieldset>
90     </form>
91 [% END %]
92
93
94 [% IF ( delete_confirm ) %]
95
96 <div class="dialog alert"><h3>Confirm deletion of tag <span class="ex">'[% searchfield %]'</span>?</h3>
97     <p>Tag: [% searchfield %]</p>
98     <p>Description: [% liblibrarian %]</p>
99     <form action="[% script_name %]" method="post">
100         <input type="hidden" name="op" value="delete_confirmed" />
101         <input type="hidden" name="searchfield" value="[% searchfield %]" /><input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
102         <input type="submit" class="approve" value="Yes, Delete this Tag" /></form>
103         
104         <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>
105 [% END %]
106
107 [% IF ( delete_confirmed ) %]
108
109     <div class="dialog message"><h3>Tag deleted</h3>
110     <form action="[% script_name %]" method="post"><input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
111     <input type="submit" value="OK" class="approve" />
112     </form></div>
113 [% END %]
114 [% IF ( framework_create ) %]
115
116     <form action="[% script_name %]" method="post">
117         <input type="hidden" name="op" value="framework_create_confirm" />
118         <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
119         Create framework for [% frameworkcode %] ([% frameworktext %]) using
120         <select name="existingframeworkcode">
121             <option value="">Default</option>
122         [% FOREACH existingframeworkloo IN existingframeworkloop %]
123             <option value="[% existingframeworkloo.value %]">[% existingframeworkloo.frameworktext %]</option>
124         [% END %]
125         </select>
126         <input type="submit" value="OK" />
127     </form>
128 [% END %]
129
130
131 [% IF ( else ) %]
132 <form name="f" action="[% script_name %]" method="post">
133 <fieldset style="padding:.5em;">
134         <label for="searchfield"><strong>Search for tag:</strong> </label>
135         <input type="text" name="searchfield" id="searchfield" size="4" value="[% searchfield %]" />
136
137 <label for="frameworkcode"><strong>In framework:</strong> </label>
138         <select id="frameworkcode" name="frameworkcode">
139             <option value="">Default</option>
140             [% FOREACH frameworkloo IN frameworkloop %]
141             [% IF ( frameworkloo.selected ) %]
142                 <option value="[% frameworkloo.value %]" selected="selected">[% frameworkloo.frameworktext %]</option>
143                 [% ELSE %]
144                 <option value="[% frameworkloo.value %]">[% frameworkloo.frameworktext %]</option>
145                 [% END %]
146             [% END %]
147         </select>
148     <input type="submit" value="Search" />
149 <p>        <label for="select_display">Display only used tags/subfields</label>
150         [% IF ( select_display ) %]
151             <input type="checkbox" name="select_display" id="select_display" value="True" checked="checked"  onchange="this.form.submit();" />
152         [% ELSE %]
153             <input type="checkbox" name="select_display" id="select_display" value="True" onchange="this.form.submit();" />
154         [% END %]</p>
155 </fieldset>
156 </form>
157
158     <table id="table_marctagstructure">
159     <thead>
160         <tr>
161         <th>Tag</th>
162         <th>Lib</th>
163         <th>Repeatable</th>
164         <th>Mandatory</th>
165         <th>Auth value</th>
166         <th>Subfields</th>
167         <th>Edit</th>
168         <th>Delete</th>
169         </tr>
170         </thead>
171     <tbody>
172     [% IF ( select_display ) %]
173         [% FOREACH loo IN loop %]
174             [% IF ( loop.odd ) %]<tr>[% ELSE %]<tr class="highlight">[% END %]
175             <td>[% loo.tagfield %]</td>
176             <td>[% loo.liblibrarian %]</td>
177             <td>[% IF ( loo.repeatable ) %]Yes[% ELSE %]No[% END %]</td>
178             <td>[% IF ( loo.mandatory ) %]Yes[% ELSE %]No[% END %]</td>
179             <td>[% loo.authorised_value %]</td>
180             <td><a href="[% loo.subfield_link %]">subfields</a></td>
181             <td><a href="[% loo.edit %]">Edit</a></td>
182             <td><a href="[% loo.delete %]">Delete</a></td>
183         </tr>
184       [% IF ( loop.odd ) %]<tr>[% ELSE %]<tr class="highlight">[% END %]
185             <td>&nbsp;</td>
186             <td colspan="7">
187                 [% FOREACH subfield IN loo.subfields %]
188                     <p> Tab:[% subfield.tab %] | $[% subfield.tagsubfield %]
189                             [% 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 %]
190                     </p>
191                 [% END %]
192             </td>
193         </tr>
194         [% END %]
195     [% ELSE %]
196     [% FOREACH loo IN loop %]
197     [% IF ( loop.odd ) %]<tr>[% ELSE %]<tr class="highlight">[% END %]
198         <td>[% loo.tagfield %]</td>
199         <td>[% loo.liblibrarian %]</td>
200         <td>[% IF ( loo.repeatable ) %]Yes[% ELSE %]No[% END %]</td>
201         <td>[% IF ( loo.mandatory ) %]Yes[% ELSE %]No[% END %]</td>
202         <td>[% loo.authorised_value %]</td>
203         <td><a href="[% loo.subfield_link %]">Subfields</a></td>
204         <td><a href="[% loo.edit %]">Edit</a></td>
205         <td><a href="[% loo.delete %]">Delete</a></td>
206     </tr>
207     [% END %]
208     [% END %]
209     </tbody>
210     </table>
211
212
213
214 [% END %]
215
216
217     </div>
218   </div>
219 <div class="yui-b">
220 [% INCLUDE 'admin-menu.inc' %]
221 </div>
222 </div>
223 [% INCLUDE 'intranet-bottom.inc' %]