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