Merge remote-tracking branch 'kc/new/enh/bug_5917' into kcmaster
[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                         $("#"+$(this).attr("href").replace("#","")).toggle();
12                         if($(this).html() == "display more constraints"){
13                                 $(this).html("hide constraints");
14                         } else {
15                                 $(this).html("display more constraints");
16                         }
17                 });
18          });
19
20 /*function displayMoreConstraint(numlayer){
21     var thisdiv = document.getElementById(numlayer);
22     if(thisdiv.getAttribute("class") == "content_hidden"){
23         thisdiv.removeAttribute('class');
24         thisdiv.setAttribute("class","content_visible");
25     } else {
26         thisdiv.removeAttribute('class');
27         thisdiv.setAttribute("class","content_hidden");
28     }
29 }*/
30
31 //]]>
32 </script>
33 </head>
34 <body>
35 [% INCLUDE 'header.inc' %]
36 [% INCLUDE 'cat-search.inc' %]
37
38 <div id="breadcrumbs">
39   <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;
40   [% IF ( add_form ) %]
41   [% IF ( use_heading_flags_p ) %]
42   [% 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
43   [% END %]
44   [% ELSE %] <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield %]&amp;frameworkcode=[% frameworkcode %]">Tag [% tagfield %] Subfield Structure</a> &rsaquo; [% action %]
45   [% END %]
46   [% END %]
47 [% 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 %]
48 [% END %]
49 [% 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
50 [% END %]
51 [% IF ( else ) %]Tag [% tagfield %] Subfield Structure[% END %]
52 </div>
53
54 <div id="doc" class="yui-t7">
55    
56    <div id="bd">
57         <div id="yui-main">
58         <div class="yui-g">
59
60 [% IF ( add_form ) %]
61     <h1>
62         [% IF ( use_heading_flags_p ) %]
63             [% IF ( heading_edit_subfields_p ) %]Tag [% tagfield %] Subfield Constraints[% END %]
64         [% ELSE %]
65             [% action %]
66         [% END %]
67     </h1>
68     <form action="[% script_name %]" name="Aform" method="post">
69     <input type="hidden" name="op" value="add_validate" />
70         <input type="hidden" name="tagfield" value="[% tagfield %]" />
71     <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
72     <input type="submit" value="Save Changes" />
73     
74     <div id="subfieldtabs" class="toptabs numbered">
75    <ul>
76         [% FOREACH loo IN loop %]
77             [% IF ( loo.new_subfield ) %]
78                 <li><a href="/cgi-bin/koha/admin/marc_subfields_structure.pl#sub[% loo.urisubfieldcode %]field" title="[% loo.liblibrarian %]">New</a></li>
79             [% ELSE %]
80                 <li><a href="/cgi-bin/koha/admin/marc_subfields_structure.pl#sub[% loo.urisubfieldcode %]field" title="[% loo.liblibrarian %]">
81                     [% loo.subfieldcode %]
82                </a></li>
83             [% END %]
84         [% END %]
85     </ul>
86     
87     [% FOREACH loo IN loop %] 
88         <div id="sub[% loo.urisubfieldcode %]field">
89         
90                <fieldset class="rows"><legend>[% IF ( loo.new_subfield ) %]Add new subfield[% ELSE %]Basic constraints[% END %]</legend>
91                         <ol>
92                                 [% IF ( subfieldcode == 0 || subfieldcode ) %] 
93                                 <li><span class="label">Subfield code:</span> [% loo.subfieldcode %] <input type="hidden" name="tagsubfield" value="[% loo.subfieldcode %]" /></li>
94                                 [% ELSE %]
95                                 <li><label for="tagsubfield[% loo.row %]">Subfield code:</label> <input type="text" id="tagsubfield[% loo.row %]" name="tagsubfield" value="[% loo.subfieldcode %]" /></li>
96                                 [% END %]
97                                 <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>
98                                 <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>
99                                 <li><label for="repeatable[% loo.row %]">Repeatable: </label>[% loo.repeatable %]</li>
100                                 <li><label for="mandatory[% loo.row %]">Mandatory: </label>[% loo.mandatory %]</li>
101                                 <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>
102                         </ol>
103             </fieldset>
104                         
105             <a class="displaymore" href="#more[% loo.urisubfieldcode %]">display more constraints</a>
106             <div id="more[% loo.urisubfieldcode %]" style="display:none; clear: both">
107              <fieldset class="rows">
108                                 <legend>Advanced constraints:</legend>
109                 <ol><li><label for="defaultvalue[% loo.row %]">Default value:</label>
110                     <input type="text" name="defaultvalue" id="defaultvalue[% loo.row %]" value="[% loo.defaultvalue %]" /></li>
111                 <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>
112                 <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>
113                 <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>
114                 <li><label for="kohafield[% loo.row %]">Koha link:</label>[% loo.kohafield %]</li>
115                         </ol>
116         </fieldset>
117          <fieldset class="rows">
118                 <legend>Other Options: (choose one)</legend>
119                         <ol>
120                                 <li><label for="authorised_value[% loo.row %]">Authorized value:</label>[% loo.authorised_value %]</li>
121                                 <li><label for="authtypecode[% loo.row %]">Thesaurus:</label>[% loo.authtypes %]</li>
122                                 <li><label for="value_builder[% loo.row %]">Plugin:</label>[% loo.value_builder %]</li>
123                         </ol>
124                                 </fieldset>
125             </div><br class="clear" /><!-- /more  -->
126         </div><!-- /content_sub -->
127         [% END %]
128                 </div><!-- /content -->
129     </form>
130 [% END %]
131
132 [% IF ( delete_confirm ) %]
133
134 <h3>Confirm Deletion of Subfield [% tagsubfield %]?</h3>
135     <p>Subfield: [% tagsubfield %]</p>
136     <p>Description: [% liblibrarian %]</p>
137
138             <form action="[% delete_link %]" method="post"><input type="hidden" name="op" value="delete_confirmed" />
139                 <input type="hidden" name="searchfield" value="[% searchfield %]" />
140                 <input type="hidden" name="tagfield" value="[% tagfield %]" />
141                                 <input type="hidden" name="tagsubfield" value="[% tagsubfield %]" />
142                                 <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
143                                 <input type="submit" value="Yes, Delete this Subfield" />
144             </form>
145                         
146                         <form action="[% script_name %]" method="post">
147                         <input type="hidden" name="searchfield" value="[% searchfield %]" />
148                         <input type="hidden" name="tagfield" value="[% tagfield %]" />
149                         <input type="hidden" name="tagsubfield" value="[% tagsubfield %]" />
150                         <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
151                         <input type="submit" value="No, Do Not Delete" />
152             </form>
153 [% END %]
154
155 [% IF ( delete_confirmed ) %]
156
157     <h3>Data deleted</h3>
158     <form action="[% script_name %]" method="post">
159         <input type="hidden" name="tagfield" value="[% tagfield %]" />
160     <input type="submit" value="OK" />
161     </form>
162 [% END %]
163
164
165 [% IF ( else ) %]
166 <h1>MARC subfield structure admin for [% tagfield %] [% IF ( frameworkcode ) %](framework [% frameworkcode %])[% ELSE %](default framework)[% END %]</h1>
167 <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>
168 <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>
169
170 <table>
171 <tr>
172     <th>Subfield</th>
173     <th>Text</th>
174     <th>Constraints</th>
175     <th>Edit</th>
176     <th>Delete</th>
177 </tr>
178 [% FOREACH loo IN loop %]
179 [% UNLESS ( loop.odd ) %]
180 <tr class="highlight">
181 [% ELSE %]
182 <tr>
183 [% END %]
184     <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>
185     <td>
186         [% IF ( loo.subfield_ignored ) %]
187             <i>[% loo.liblibrarian %]</i>
188         [% ELSE %]
189             [% loo.liblibrarian %]
190         [% END %]
191     </td>
192     <td>
193         [% IF ( loo.subfield_ignored ) %]
194             <i>subfield ignored</i>
195         [% ELSE %]
196             Tab:[% loo.tab %],
197             [% IF ( loo.kohafield ) %] | Koha field: [% loo.kohafield %], [% END %]
198             [% IF ( loo.repeatable ) %]Repeatable, [% ELSE %]Not repeatable,[% END %]
199             [% IF ( loo.mandatory ) %]Mandatory, [% ELSE %]Not mandatory,[% END %]
200             [% IF ( loo.seealso ) %] | See Also: [% loo.seealso %],[% END %]
201             [% IF ( loo.hidden ) %]hidden,[% END %]
202             [% IF ( loo.isurl ) %]is a url,[% END %]
203             [% IF ( loo.authorised_value ) %] | Auth value:[% loo.authorised_value %],[% END %]
204             [% IF ( loo.authtypecode ) %] | Authority:[% loo.authtypecode %],[% END %]
205             [% IF ( loo.value_builder ) %] | Plugin:[% loo.value_builder %],[% END %]
206             [% IF ( loo.link ) %] | Link:[% loo.link %],[% END %]
207         [% END %]
208     </td>
209     <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>
210     <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>
211 </tr>
212 [% END %]
213 </table>
214
215 <form action="[% script_name %]" method="get">
216     <fieldset class="action"><input type="hidden" name="op" value="add_form" />
217     <input type="hidden" name="tagfield" value="[% edit_tagfield %]" />
218     <input type="hidden" name="frameworkcode" value="[% edit_frameworkcode %]" />
219     <input type="submit" value="Edit Subfields" />
220         <a class="cancel" href="marctagstructure.pl?searchfield=[% tagfield %]&amp;frameworkcode=[% frameworkcode %]">Cancel</a>
221         </fieldset>
222 </form>
223
224 [% IF ( previous ) %]
225     <input type="image" src="[% interface %]/[% theme %]/images/1leftarrow.png" title="previous" alt="previous" border="0" />
226 [% END %]
227 [% IF ( next ) %]
228     [% next %]
229         <input type="image" src="[% interface %]/[% theme %]/images/1rightarrow.png" title="next" alt="next" border="0" />
230 [% END %]
231 [% END %]
232
233
234
235 </div>
236 </div>
237 </div>
238 [% INCLUDE 'intranet-bottom.inc' %]