Bug 7760: Add unique ids and a module class to all administration pages
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / marc_subfields_structure.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Administration &rsaquo;[% IF ( add_form ) %][% IF ( use_heading_flags_p ) %][% IF ( heading_edit_subfields_p ) %] MARC Subfield Structure &rsaquo; Edit MARC subfields constraints[% END %][% ELSE %] MARC Subfield Structure &rsaquo; [% action %][% END %][% END %]
3 [% IF ( delete_confirm ) %] MARC Subfield Structure &rsaquo; Confirm Deletion of Subfield [% tagsubfield %][% END %][% IF ( delete_confirmed ) %] MARC Subfield Structure &rsaquo; Subfield Deleted[% END %][% IF ( else ) %]MARC Subfield Structure[% END %]</title>
4 [% INCLUDE 'doc-head-close.inc' %]
5 <script type="text/javascript">
6 //<![CDATA[
7
8 $(document).ready(function() {
9     $('#subfieldtabs > ul').tabs();
10         $("a.displaymore").click(function(){
11         var link = $(this);
12         var constraints = $("#"+$(this).attr("href").replace("#",""));
13         constraints.toggle();
14             if($(constraints).is(':visible')){
15                 link.html(_("Hide constraints"));
16             } else {
17                 link.html(_("Display more constraints"));
18             }
19     });
20 });
21
22 /*function displayMoreConstraint(numlayer){
23     var thisdiv = document.getElementById(numlayer);
24     if(thisdiv.getAttribute("class") == "content_hidden"){
25         thisdiv.removeAttribute('class');
26         thisdiv.setAttribute("class","content_visible");
27     } else {
28         thisdiv.removeAttribute('class');
29         thisdiv.setAttribute("class","content_hidden");
30     }
31 }*/
32
33 //]]>
34 </script>
35 </head>
36 <body id="admin_marc_subfields_structure" 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> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC Frameworks</a> &rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode %]&amp;searchfield=[% tagfield %]">[% frameworkcode %] Framework Structure</a> &rsaquo;
42   [% IF ( add_form ) %]
43   [% IF ( use_heading_flags_p ) %]
44   [% IF ( heading_edit_subfields_p ) %] <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield %]&amp;frameworkcode=[% frameworkcode %]">Tag [% tagfield %] Subfield Structure</a> &rsaquo; Edit subfields constraints
45   [% END %]
46   [% ELSE %] <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield %]&amp;frameworkcode=[% frameworkcode %]">Tag [% tagfield %] Subfield Structure</a> &rsaquo; [% action %]
47   [% END %]
48   [% END %]
49 [% IF ( delete_confirm ) %] <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield %]&amp;frameworkcode=[% frameworkcode %]">Tag [% tagfield %] Subfield Structure</a> &rsaquo; Confirm Deletion of Subfield [% tagsubfield %]
50 [% END %]
51 [% IF ( delete_confirmed ) %] <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield %]&amp;frameworkcode=[% frameworkcode %]">Tag [% tagfield %] Subfield Structure</a> &rsaquo; Subfield Deleted
52 [% END %]
53 [% IF ( else ) %]Tag [% tagfield %] Subfield Structure[% END %]
54 </div>
55
56 <div id="doc" class="yui-t7">
57    
58    <div id="bd">
59         <div id="yui-main">
60         <div class="yui-g">
61
62 [% IF ( add_form ) %]
63     <h1>
64         [% IF ( use_heading_flags_p ) %]
65             [% IF ( heading_edit_subfields_p ) %]Tag [% tagfield %] Subfield Constraints[% END %]
66         [% ELSE %]
67             [% action %]
68         [% END %]
69     </h1>
70     <form action="[% script_name %]" name="Aform" method="post">
71     <input type="hidden" name="op" value="add_validate" />
72         <input type="hidden" name="tagfield" value="[% tagfield %]" />
73     <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
74     <input type="submit" value="Save Changes" />
75     
76     <div id="subfieldtabs" class="toptabs numbered">
77    <ul>
78         [% FOREACH loo IN loop %]
79             [% IF ( loo.new_subfield ) %]
80                 <li><a href="/cgi-bin/koha/admin/marc_subfields_structure.pl#sub[% loo.urisubfieldcode %]field" title="[% loo.liblibrarian %]">New</a></li>
81             [% ELSE %]
82                 <li><a href="/cgi-bin/koha/admin/marc_subfields_structure.pl#sub[% loo.urisubfieldcode %]field" title="[% loo.liblibrarian %]">
83                     [% loo.subfieldcode %]
84                </a></li>
85             [% END %]
86         [% END %]
87     </ul>
88     
89     [% FOREACH loo IN loop %] 
90         <div id="sub[% loo.urisubfieldcode %]field">
91         
92                <fieldset class="rows" style="float:none;"><legend>[% IF ( loo.new_subfield ) %]Add new subfield[% ELSE %]Basic constraints[% END %]</legend>
93                         <ol>
94                                 [% IF ( subfieldcode == 0 || subfieldcode ) %] 
95                                 <li><span class="label">Subfield code:</span> [% loo.subfieldcode %] <input type="hidden" name="tagsubfield" value="[% loo.subfieldcode %]" /></li>
96                                 [% ELSE %]
97                                 <li><label for="tagsubfield[% loo.row %]">Subfield code:</label> <input type="text" id="tagsubfield[% loo.row %]" name="tagsubfield" value="[% loo.subfieldcode %]" /></li>
98                                 [% END %]
99                                 <li><label for="liblibrarian[% loo.row %]">Text for librarian: </label><input id="liblibrarian[% loo.row %]" type="text" name="liblibrarian" value="[% loo.liblibrarian %]" size="40" maxlength="80" /></li>
100                                 <li><label for="libopac[% loo.row %]">Text for OPAC: </label><input type="text" id="libopac[% loo.row %]" name="libopac" value="[% loo.libopac %]" size="40" maxlength="80" /></li>
101                                 <li><label for="repeatable[% loo.row %]">Repeatable: </label>[% loo.repeatable %]</li>
102                                 <li><label for="mandatory[% loo.row %]">Mandatory: </label>[% loo.mandatory %]</li>
103                                 <li><label for="tab[% loo.row %]">Managed in tab: </label>[% loo.tab %] (ignore means that the subfield does not display in the record editor)</li>
104                         </ol>
105             </fieldset>
106                         
107             <a class="displaymore" href="#more[% loo.urisubfieldcode %]">Display more constraints</a>
108             <div id="more[% loo.urisubfieldcode %]" style="display:none; clear: both">
109              <fieldset class="rows" style="float:none;">
110                                 <legend>Advanced constraints:</legend>
111                 <ol><li><label for="defaultvalue[% loo.row %]">Default value:</label>
112                     <input type="text" name="defaultvalue" id="defaultvalue[% loo.row %]" value="[% loo.defaultvalue %]" /></li>
113                 <li><label for="hidden[% loo.row %]">hidden</label><input type="text" id="hidden[% loo.row %]" name="hidden" value="[% loo.hidden %]" size="2" /> (see online help)</li>
114                 <li><label for="isurl[% loo.row %]">Is a url:</label>[% loo.isurl %] (if checked, it means that the subfield is a url and can be clicked)</li>
115                 <li><label for="link[% loo.row %]">Link:</label><input type="text" id="link[% loo.row %]" name="link" value="[% loo.link %]" size="10" maxlength="80" /> (e.g., Title or Local-Number) <span class="error"><em>NOTE: If you change this value you must ask your administrator to run misc/batchRebuildBiblioTables.pl.</em></span></li>
116                 <li><label for="kohafield[% loo.row %]">Koha link:</label>[% loo.kohafield %]</li>
117                         </ol>
118         </fieldset>
119          <fieldset class="rows" style="float:none;">
120                 <legend>Other Options: (choose one)</legend>
121                         <ol>
122                                 <li><label for="authorised_value[% loo.row %]">Authorized value:</label>[% loo.authorised_value %]</li>
123                                 <li><label for="authtypecode[% loo.row %]">Thesaurus:</label>[% loo.authtypes %]</li>
124                                 <li><label for="value_builder[% loo.row %]">Plugin:</label>[% loo.value_builder %]</li>
125                         </ol>
126                                 </fieldset>
127             </div><br class="clear" /><!-- /more  -->
128         </div><!-- /content_sub -->
129         [% END %]
130                 </div><!-- /content -->
131     </form>
132 [% END %]
133
134 [% IF ( delete_confirm ) %]
135
136 <h3>Confirm Deletion of Subfield [% tagsubfield %]?</h3>
137     <p>Subfield: [% tagsubfield %]</p>
138     <p>Description: [% liblibrarian %]</p>
139
140             <form action="[% delete_link %]" method="post"><input type="hidden" name="op" value="delete_confirmed" />
141                 <input type="hidden" name="searchfield" value="[% searchfield %]" />
142                 <input type="hidden" name="tagfield" value="[% tagfield %]" />
143                                 <input type="hidden" name="tagsubfield" value="[% tagsubfield %]" />
144                                 <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
145                                 <input type="submit" value="Yes, Delete this Subfield" />
146             </form>
147                         
148                         <form action="[% script_name %]" method="post">
149                         <input type="hidden" name="searchfield" value="[% searchfield %]" />
150                         <input type="hidden" name="tagfield" value="[% tagfield %]" />
151                         <input type="hidden" name="tagsubfield" value="[% tagsubfield %]" />
152                         <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
153                         <input type="submit" value="No, Do Not Delete" />
154             </form>
155 [% END %]
156
157 [% IF ( delete_confirmed ) %]
158
159     <h3>Data deleted</h3>
160     <form action="[% script_name %]" method="post">
161         <input type="hidden" name="tagfield" value="[% tagfield %]" />
162     <input type="submit" value="OK" />
163     </form>
164 [% END %]
165
166
167 [% IF ( else ) %]
168 <h1>MARC subfield structure admin for [% tagfield %] [% IF ( frameworkcode ) %](framework [% frameworkcode %])[% ELSE %](default framework)[% END %]</h1>
169 <p>This screen shows the subfields associated with the selected tag. You can edit subfields or add a new one by clicking on edit. </p>
170 <p>The column Koha field shows that the subfield is linked with a Koha field. Koha can manage a MARC interface, or a Koha interface. This link ensures that both DB are synchronized, thus you can change from a MARC to a Koha interface easily.</p>
171
172 <table>
173 <tr>
174     <th>Subfield</th>
175     <th>Text</th>
176     <th>Constraints</th>
177     <th>Edit</th>
178     <th>Delete</th>
179 </tr>
180 [% FOREACH loo IN loop %]
181 [% UNLESS ( loop.odd ) %]
182 <tr class="highlight">
183 [% ELSE %]
184 <tr>
185 [% END %]
186     <td><a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&amp;tagfield=[% loo.tagfield %]&amp;frameworkcode=[% frameworkcode %]#sub[% loo.tagsubfield %]field">[% loo.tagsubfield %]</a></td>
187     <td>
188         [% IF ( loo.subfield_ignored ) %]
189             <i>[% loo.liblibrarian %]</i>
190         [% ELSE %]
191             [% loo.liblibrarian %]
192         [% END %]
193     </td>
194     <td>
195         [% IF ( loo.subfield_ignored ) %]
196             <i>subfield ignored</i>
197         [% ELSE %]
198             Tab:[% loo.tab %],
199             [% IF ( loo.kohafield ) %] | Koha field: [% loo.kohafield %], [% END %]
200             [% IF ( loo.repeatable ) %]Repeatable, [% ELSE %]Not repeatable,[% END %]
201             [% IF ( loo.mandatory ) %]Mandatory, [% ELSE %]Not mandatory,[% END %]
202             [% IF ( loo.seealso ) %] | See Also: [% loo.seealso %],[% END %]
203             [% IF ( loo.hidden ) %]hidden,[% END %]
204             [% IF ( loo.isurl ) %]is a url,[% END %]
205             [% IF ( loo.authorised_value ) %] | Auth value:[% loo.authorised_value %],[% END %]
206             [% IF ( loo.authtypecode ) %] | Authority:[% loo.authtypecode %],[% END %]
207             [% IF ( loo.value_builder ) %] | Plugin:[% loo.value_builder %],[% END %]
208             [% IF ( loo.link ) %] | Link:[% loo.link %],[% END %]
209         [% END %]
210     </td>
211     <td><a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&amp;tagfield=[% loo.tagfield %]&amp;frameworkcode=[% frameworkcode %]#sub[% loo.tagsubfield %]field">Edit</a></td>
212     <td><a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?op=delete_confirm&amp;tagfield=[% loo.tagfield %]&amp;tagsubfield=[% loo.tagsubfield %]&amp;frameworkcode=[% frameworkcode %]">Delete</a></td>
213 </tr>
214 [% END %]
215 </table>
216
217 <form action="[% script_name %]" method="get">
218     <fieldset class="action"><input type="hidden" name="op" value="add_form" />
219     <input type="hidden" name="tagfield" value="[% edit_tagfield %]" />
220     <input type="hidden" name="frameworkcode" value="[% edit_frameworkcode %]" />
221     <input type="submit" value="Edit Subfields" />
222         <a class="cancel" href="marctagstructure.pl?searchfield=[% tagfield %]&amp;frameworkcode=[% frameworkcode %]">Cancel</a>
223         </fieldset>
224 </form>
225
226 [% END %]
227
228
229
230 </div>
231 </div>
232 </div>
233 [% INCLUDE 'intranet-bottom.inc' %]