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