Bug 10515: make behavior of library category fetchers consistent with other fetchers
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / auth_subfields_structure.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Administration &rsaquo; Authority MARC subfield structure</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 <script type="text/javascript">
5 //<![CDATA[
6
7      $(document).ready(function() {
8         $('#subfieldtabs').tabs();
9      });
10
11 function displayMoreConstraint(numlayer){
12     var thisdiv = document.getElementById(numlayer);
13     if(thisdiv.getAttribute("class") == "content_hidden"){
14         thisdiv.removeAttribute('class');
15         thisdiv.setAttribute("class","content_visible");
16     } else {
17         thisdiv.removeAttribute('class');
18         thisdiv.setAttribute("class","content_hidden");
19     }
20 }
21
22 //]]>
23 </script>
24 </head>
25 <body id="admin_auth_subfields_structure" class="admin">
26 [% INCLUDE 'header.inc' %]
27 [% INCLUDE 'cat-search.inc' %]
28 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo;
29   <a href="/cgi-bin/koha/admin/authtypes.pl">Authority types</a> &rsaquo;
30   [% IF ( authtypecode ) %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode %]">[% authtypecode %] framework</a> &rsaquo;
31   [% ELSE %]<a href="/cgi-bin/koha/admin/auth_tag_structure.pl">Default framework</a> &rsaquo;
32   [% END %]
33   [% IF ( else ) %]Authority MARC subfield structure for [% tagfield %]
34   [% ELSE %]<a href="/cgi-bin/koha/admin/auth_subfields_structure.pl?tagfield=[% tagfield %]&amp;tagsubfield=[% tagsubfield %]&amp;authtypecode=[% authtypecode %]">Authority MARC subfield structure for [% tagfield %]</a> &rsaquo;
35   [% END %]
36   [% IF ( delete_confirm ) %]Confirm deletion of subfield [% tagsubfield %]?[% END %]
37   [% IF ( delete_confirmed ) %]Data deleted[% END %]
38   [% IF ( add_form ) %]
39   [% IF ( use_heading_flags_p ) %]
40   [% IF ( heading_edit_subfields_p ) %]Edit MARC subfields constraints[% END %]
41   [% ELSE %][% action %][% END %]
42   [% END %]
43 </div>
44
45 <div id="doc3" class="yui-t2">
46
47 <div id="bd">
48     <div id="yui-main">
49     <div class="yui-b">
50
51 [% IF ( add_form ) %]
52
53     <h1>[% IF ( use_heading_flags_p ) %]
54     [% IF ( heading_edit_subfields_p ) %]Edit MARC subfields constraints for field [% tagfield %] authority [% authtypecode %][% END %]
55     [% ELSE %][% action %][% END %]</h1>
56     <form action="[% script_name %]" name="Aform" method="post">
57         <input type="hidden" name="op" value="add_validate" />
58         <input type="hidden" name="tagfield" value="[% tagfield %]" />
59         <input type="hidden" name="authtypecode" value="[% authtypecode %]" />
60         <fieldset class="action"><input type="submit" class="submit" value="Save changes" /> <a class="cancel" href="/cgi-bin/koha/admin/auth_subfields_structure.pl?tagfield=[% tagfield %]&amp;authtypecode=[% authtypecode %]">Cancel</a></fieldset>
61         <div id="subfieldtabs" class="toptabs numbered">
62             <ul>
63                 [% FOREACH loo IN loop %]
64                     [% IF ( loo.new_subfield ) %]
65                         [% IF ( tagfield >=10 ) %]<!-- display new only for > 10 fields -->
66                         <li><a href="#sub[% loo.tagsubfield %]field" title="[% loo.liblibrarian %]">New</a></li>
67                         [% END %]
68                     [% ELSE %]
69                         <li><a href="#sub[% loo.tagsubfield %]field" title="[% loo.liblibrarian %]">
70                             [% loo.tagsubfield %]
71                     </a></li>
72                     [% END %]
73                 [% END %]
74             </ul>
75
76         [% FOREACH loo IN loop %]
77         <div id="sub[% loo.tagsubfield %]field">
78             <fieldset class="rows"><ol>
79
80                     [% IF ( loo.new_subfield ) %]
81                 <li><label for="tagsubfieldinput[% loo.row %]">Subfield code: </label>[% loo.tagsubfieldinput %]&nbsp;</li>
82                     [% ELSE %]
83                 <li>
84                 <input type="hidden" name="tagsubfield" value="[% loo.tagsubfield %]" />
85                  </li>
86                     [% END %]
87                 <li><label for="repeatable[% loo.row %]">Repeatable: </label>[% loo.repeatable %]&nbsp;</li>
88                 <li><label for="mandatory[% loo.row %]">Mandatory: </label>[% loo.mandatory %]&nbsp;</li>
89                 <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>
90                 <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>
91                 <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>
92                 <li>
93                     <fieldset>
94                         <legend>Display</legend>
95                         <ol>
96                             <li><label for="ohidden[% loo.row %]">Select to display or not:</label>[% loo.ohidden %]  </li>
97                             <!-- <li><label for="ihidden[% loo.row %]">Intranet:</label>[% loo.ihidden %] </li> -->
98                             <!-- <li><label for="ehidden[% loo.row %]">Editor:</label>[% loo.ehidden %] (see online help)</li> -->
99                         </ol>
100                     </fieldset>
101                 </li>
102                 <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>
103                 <li>
104                     <fieldset><legend>Help input</legend>    
105                         <ol>
106                             <li><label for="authorised_value[% loo.row %]">Authorized value:</label> [% loo.authorised_value %]</li>
107                             <li><label for="frameworkcode[% loo.row %]">Thesaurus:</label> [% loo.frameworkcode %]</li>
108                             <li><label for="value_builder[% loo.row %]">Plugin:</label> [% loo.value_builder %]</li>
109                         </ol>
110                     </fieldset>
111                 </li>
112             </ol></fieldset><br class="clear" />
113         </div>
114         [% END %]
115         </div>
116     </form>
117 [% END %]
118
119 [% IF ( delete_confirm ) %]
120
121     <div class="dialog alert"><h3>Delete subfield <span class="ex">'[% tagsubfield %]'?</span></h3>
122     <form action="[% delete_link %]" method="post"><input type="hidden" name="op" value="delete_confirmed" />
123     <table><tr><th scope="row">Subfield:</th> <td>[% tagsubfield %]</td></tr>
124     <tr><th scope="row">Description:</th> <td>[% liblibrarian %]</td></tr></table>
125         <input type="hidden" name="searchfield" value="[% searchfield %]" />
126         <input type="hidden" name="tagfield" value="[% tagfield %]" />
127         <input type="hidden" name="tagsubfield" value="[% tagsubfield %]" />
128         <input type="hidden" name="authtypecode" value="[% authtypecode %]" />
129         <input type="submit" class="approve" value="Yes, delete this subfield" />
130         </form>
131         <form action="[% delete_link %]" method="get">
132          <input type="hidden" name="searchfield" value="[% searchfield %]" />
133         <input type="hidden" name="tagfield" value="[% tagfield %]" />
134         <input type="hidden" name="tagsubfield" value="[% tagsubfield %]" />
135         <input type="hidden" name="authtypecode" value="[% authtypecode %]" />
136         <input type="submit" class="deny" value="No, do not delete" />
137         </form>
138     </form></div>
139 [% END %]
140
141 [% IF ( delete_confirmed ) %]
142
143    <div class="dialog message"> <h3>Data deleted</h3>
144     <form action="[% script_name %]" method="post">
145         <input type="hidden" name="tagfield" value="[% tagfield %]" />
146         <input type="submit" class="approve" value="OK" />
147     </form></div>
148 [% END %]
149
150
151 [% IF ( else ) %]
152 <h1>Authority MARC subfield structure admin for [% tagfield %] (authority: [% authtypecode %])</h1>
153 <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>
154 <p>The column <b>Koha field</b> shows that the subfield is linked with a Koha field. Koha can manage a MARC interface, and a Koha interface. This link ensures that both DB are synchronized</p>
155
156 <table>
157     <tr>
158         <th>Subfield</th>
159         <th>Text</th>
160         <th>Constraints</th>
161         <th>Delete</th>
162     </tr>
163     [% FOREACH loo IN loop %]
164     [% UNLESS ( loop.odd ) %]
165     <tr class="highlight">
166     [% ELSE %]
167     <tr>
168     [% END %]
169         <td>[% loo.tagsubfield %]</td>
170         <td>
171             [% IF ( loo.subfield_ignored ) %]
172                     <i>[% loo.liblibrarian %]</i>
173             [% ELSE %]
174                     [% loo.liblibrarian %]
175             [% END %]
176         </td>
177         <td>
178             [% IF ( loo.subfield_ignored ) %]
179                     <i>subfield ignored</i>
180             [% ELSE %]
181                 <strong>Tab:</strong>[% loo.tab %],
182                 [% IF ( loo.kohafield ) %] | <strong>Koha field:</strong> [% loo.kohafield %], [% END %]
183                 [% IF ( loo.repeatable ) %]Repeatable, [% ELSE %]Not repeatable,
184                 [% END %]
185                         [% IF ( loo.mandatory ) %]Mandatory, [% ELSE %]Not mandatory,
186                 [% END %]
187                         [% IF ( loo.hidden ) %]hidden,
188                 [% END %]
189                         [% IF ( loo.isurl ) %]is a url,
190                 [% END %]
191                         [% IF ( loo.authorised_value ) %] | <strong>Auth value:</strong>[% loo.authorised_value %],
192                 [% END %]
193                         [% IF ( loo.frameworkcode ) %] | <strong>Authority:</strong>[% loo.frameworkcode %],
194                 [% END %]
195                 [% IF ( loo.value_builder ) %] | <strong>Plugin:</strong>[% loo.value_builder %],[% END %]
196             [% END %]
197         </td>
198         <td><a href="[% loo.delete %]">Delete</a></td>
199     </tr>
200     [% END %]
201 </table>
202
203     <form action="[% script_name %]" method="get">
204     <fieldset class="action"><input type="hidden" name="op" value="add_form" />
205     <input type="hidden" name="tagfield" value="[% edit_tagfield %]" />
206     <input type="hidden" name="authtypecode" value="[% edit_authtypecode %]" />
207     <input type="submit" value="Edit subfields" />
208     <a class="cancel" href="auth_tag_structure.pl?searchfield=[% tagfield %]&amp;authtypecode=[% authtypecode %]">Cancel</a></fieldset>
209     </form>
210
211     [% IF ( previous ) %]
212     <input type="image" src="[% interface %]/[% theme %]/images/1leftarrow.png" title="previous" alt="previous" border="0" />
213     </a>
214     [% END %]
215     [% IF ( next ) %]
216         [% next %]
217     <input type="image" src="[% interface %]/[% theme %]/images/1rightarrow.png" title="next" alt="next" border="0" />
218     </a>
219     [% END %]
220
221 [% END %]
222
223 </div>
224 </div>
225 <div class="yui-b">
226 [% INCLUDE 'admin-menu.inc' %]
227 </div>
228 </div>
229 [% INCLUDE 'intranet-bottom.inc' %]