Bug 9639 - Replace YUI button on MARC tag structure toolbar with Bootstrap
[koha-equinox.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 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
9 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.pager.js"></script>
10 <script type="text/javascript" id="js">$(document).ready(function() {
11         $("#table_marctagstructure").tablesorter({
12                 sortList: [[0,0]],
13                 headers: { 5: { sorter: false},6: { sorter: false},7: { sorter: false}}
14         }).tablesorterPager({container: $("#pagertable_marctagstructure"),positionFixed: false,size: 20});
15 }); </script>
16 <script type="text/javascript">
17 //<![CDATA[
18 function Check(f) {
19     var _alertString="";
20     var alertString2;
21     if (f.tagfield.value.length==0) {
22         _alertString += "\n- " + _("tag number missing");
23     }
24     if (_alertString.length==0) {
25         document.Aform.submit();
26     } else {
27         alertString2  = _("Form not submitted because of the following problem(s)");
28         alertString2 += "\n------------------------------------------------------------------------------------\n";
29         alertString2 += _alertString;
30         alert(alertString2);
31     }
32 }
33 //]]>
34 </script>
35 </head>
36 <body id="admin_marctagstructure" class="admin">
37 [% INCLUDE 'header.inc' %]
38 [% INCLUDE 'cat-search.inc' %]
39
40 <div id="breadcrumbs">
41          <a href="/cgi-bin/koha/mainpage.pl">Home</a>
42 &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
43 &rsaquo; <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a>
44 [% IF ( add_form ) %]
45 &rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode %]">[% frameworktext %] ([% frameworkcode %])</a>
46 &rsaquo; [% action %] [% searchfield %]
47 [% ELSIF ( else ) %]
48 &rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode %]">[% IF ( frameworkcode ) %][% frameworktext %] ([% frameworkcode %])[% ELSE %]Default MARC framework[% END %]</a>
49 [% ELSIF ( delete_confirm ) %]
50 &rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode %]">[% frameworktext %] ([% frameworkcode %])</a>
51 &rsaquo; Confirm deletion of tag '[% searchfield %]'
52 [% ELSIF ( delete_confirmed ) %]
53 &rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode %]">[% frameworktext %] ([% frameworkcode %])</a>
54 &rsaquo; Data deleted
55 [% END %]
56 </div>
57
58 <div id="doc3" class="yui-t2">
59   <div id="bd">
60     <div id="yui-main">
61       <div class="yui-b">
62
63 [% IF ( else ) %]
64 <div id="toolbar" class="btn-toolbar">
65     <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>
66 </div>[% END %]
67
68 <h1>MARC Framework for [% IF ( frameworkcode ) %][% frameworktext %] ([% frameworkcode %])[% ELSE %]default MARC framework[% END %]</h1>
69
70 [% IF ( add_form ) %]
71
72     <form action="[% script_name %]" name="Aform" method="post">
73         
74       <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" />
75         <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
76
77         <ol> <li><label for="tagfield">Tag: </label><input id="tagfield" type="text" name="tagfield" value="[% searchfield %]" maxlength="3" size="3" /></li>    
78     <li><label for="liblibrarian">Label for lib: </label><input type="text" id="liblibrarian" name="liblibrarian" value="[% liblibrarian |html %]" size="40" maxlength="100" /></li>
79     <li><label for="libopac">Label for opac: </label><input type="text" id="libopac" name="libopac" value="[% libopac |html %]" size="40" maxlength="100" /></li>
80     <li><label for="repeatable">Repeatable: </label>[% repeatable %]</li>
81     <li><label for="mandatory">Mandatory: </label>[% mandatory %]</li>
82     <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>
83 </ol></fieldset> 
84     <fieldset class="action">
85         <input type="submit" value="Save Changes" onclick="Check(this.form)" />
86         <a class="cancel" href="[% script_name %]?frameworkcode=[% frameworkcode %]">Cancel</a>
87     </fieldset>
88     </form>
89 [% END %]
90
91
92 [% IF ( delete_confirm ) %]
93
94 <div class="dialog alert"><h3>Confirm deletion of tag <span class="ex">'[% searchfield %]'</span>?</h3>
95     <p>Tag: [% searchfield %]</p>
96     <p>Description: [% liblibrarian %]</p>
97     <form action="[% script_name %]" method="post">
98         <input type="hidden" name="op" value="delete_confirmed" />
99         <input type="hidden" name="searchfield" value="[% searchfield %]" /><input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
100         <input type="submit" class="approve" value="Yes, Delete this Tag" /></form>
101         
102         <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>
103 [% END %]
104
105 [% IF ( delete_confirmed ) %]
106
107     <div class="dialog message"><h3>Tag deleted</h3>
108     <form action="[% script_name %]" method="post"><input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
109     <input type="submit" value="OK" class="approve" />
110     </form></div>
111 [% END %]
112 [% IF ( framework_create ) %]
113
114     <form action="[% script_name %]" method="post">
115         <input type="hidden" name="op" value="framework_create_confirm" />
116         <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
117         Create framework for [% frameworkcode %] ([% frameworktext %]) using
118         <select name="existingframeworkcode">
119             <option value="">Default</option>
120         [% FOREACH existingframeworkloo IN existingframeworkloop %]
121             <option value="[% existingframeworkloo.value %]">[% existingframeworkloo.frameworktext %]</option>
122         [% END %]
123         </select>
124         <input type="submit" value="OK" />
125     </form>
126 [% END %]
127
128
129 [% IF ( else ) %]
130 <form name="f" action="[% script_name %]" method="post">
131 <fieldset style="padding:.5em;">
132         <label for="searchfield"><strong>Search for tag:</strong> </label>
133         <input type="text" name="searchfield" id="searchfield" size="4" value="[% searchfield %]" />
134
135 <label for="frameworkcode"><strong>In framework:</strong> </label>
136         <select id="frameworkcode" name="frameworkcode">
137             <option value="">Default</option>
138             [% FOREACH frameworkloo IN frameworkloop %]
139             [% IF ( frameworkloo.selected ) %]
140                 <option value="[% frameworkloo.value %]" selected="selected">[% frameworkloo.frameworktext %]</option>
141                 [% ELSE %]
142                 <option value="[% frameworkloo.value %]">[% frameworkloo.frameworktext %]</option>
143                 [% END %]
144             [% END %]
145         </select>
146     <input type="submit" value="Search" />
147 <p>        <label for="select_display">Display only used tags/subfields</label>
148         [% IF ( select_display ) %]
149             <input type="checkbox" name="select_display" id="select_display" value="True" checked="checked"  onchange="this.form.submit();" />
150         [% ELSE %]
151             <input type="checkbox" name="select_display" id="select_display" value="True" onchange="this.form.submit();" />
152         [% END %]</p>
153 </fieldset>
154 </form>
155 <div id="pagertable_marctagstructure">
156 [% INCLUDE 'table-pager.inc' perpage='20' %]
157 </div>
158     <table id="table_marctagstructure">
159     <thead>
160         <th>Tag</th>
161         <th>Lib</th>
162         <th>Repeatable</th>
163         <th>Mandatory</th>
164         <th>Auth value</th>
165         <th>Subfields</th>
166         <th>Edit</th>
167         <th>Delete</th>
168         </thead>
169
170     [% IF ( select_display ) %]
171         [% FOREACH loo IN loop %]
172             [% IF ( loop.odd ) %]<tr>[% ELSE %]<tr class="highlight">[% END %]
173             <td>[% loo.tagfield %]</td>
174             <td>[% loo.liblibrarian %]</td>
175             <td>[% IF ( loo.repeatable ) %]Yes[% ELSE %]No[% END %]</td>
176             <td>[% IF ( loo.mandatory ) %]Yes[% ELSE %]No[% END %]</td>
177             <td>[% loo.authorised_value %]</td>
178             <td><a href="[% loo.subfield_link %]">subfields</a></td>
179             <td><a href="[% loo.edit %]">Edit</a></td>
180             <td><a href="[% loo.delete %]">Delete</a></td>
181         </tr>
182       [% IF ( loop.odd ) %]<tr>[% ELSE %]<tr class="highlight">[% END %]
183             <td>&nbsp;</td>
184             <td colspan="7">
185                 [% FOREACH subfield IN loo.subfields %]
186                     <p> Tab:[% subfield.tab %] | $[% subfield.tagsubfield %]
187                             [% 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 %]
188                     </p>
189                 [% END %]
190             </td>
191         </tr>
192         [% END %]
193     [% ELSE %]
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     [% END %]
206     [% END %]
207     </table>
208
209
210
211 [% END %]
212
213
214     </div>
215   </div>
216 <div class="yui-b">
217 [% INCLUDE 'admin-menu.inc' %]
218 </div>
219 </div>
220 [% INCLUDE 'intranet-bottom.inc' %]