Bug 8015: Add MARC Modifications Templates
[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>
103                     <fieldset class="rows">
104                         <legend>Advanced constraints:</legend>
105                         <ol>
106                             <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>
107                             <li>
108                                 <label for="defaultvalue[% loo.row %]">Default value:</label>
109                                 <input type="text" name="defaultvalue" id="defaultvalue[% loo.row %]" value="[% loo.defaultvalue %]" />
110                             </li>
111                         </ol>
112                     </fieldset>
113                 </li>
114                 <li>
115                     <fieldset><legend>Help input</legend>    
116                         <ol>
117                             <li><label for="authorised_value[% loo.row %]">Authorized value:</label> [% loo.authorised_value %]</li>
118                             <li><label for="frameworkcode[% loo.row %]">Thesaurus:</label> [% loo.frameworkcode %]</li>
119                             <li><label for="value_builder[% loo.row %]">Plugin:</label> [% loo.value_builder %]</li>
120                         </ol>
121                     </fieldset>
122                 </li>
123             </ol></fieldset><br class="clear" />
124         </div>
125         [% END %]
126         </div>
127     </form>
128 [% END %]
129
130 [% IF ( delete_confirm ) %]
131
132     <div class="dialog alert"><h3>Delete subfield <span class="ex">'[% tagsubfield %]'?</span></h3>
133     <form action="[% delete_link %]" method="post"><input type="hidden" name="op" value="delete_confirmed" />
134     <table><tr><th scope="row">Subfield:</th> <td>[% tagsubfield %]</td></tr>
135     <tr><th scope="row">Description:</th> <td>[% liblibrarian %]</td></tr></table>
136         <input type="hidden" name="searchfield" value="[% searchfield %]" />
137         <input type="hidden" name="tagfield" value="[% tagfield %]" />
138         <input type="hidden" name="tagsubfield" value="[% tagsubfield %]" />
139         <input type="hidden" name="authtypecode" value="[% authtypecode %]" />
140         <input type="submit" class="approve" value="Yes, delete this subfield" />
141         </form>
142         <form action="[% delete_link %]" method="get">
143          <input type="hidden" name="searchfield" value="[% searchfield %]" />
144         <input type="hidden" name="tagfield" value="[% tagfield %]" />
145         <input type="hidden" name="tagsubfield" value="[% tagsubfield %]" />
146         <input type="hidden" name="authtypecode" value="[% authtypecode %]" />
147         <input type="submit" class="deny" value="No, do not delete" />
148         </form>
149     </form></div>
150 [% END %]
151
152 [% IF ( delete_confirmed ) %]
153
154    <div class="dialog message"> <h3>Data deleted</h3>
155     <form action="[% script_name %]" method="post">
156         <input type="hidden" name="tagfield" value="[% tagfield %]" />
157         <input type="submit" class="approve" value="OK" />
158     </form></div>
159 [% END %]
160
161
162 [% IF ( else ) %]
163 <h1>Authority MARC subfield structure admin for [% tagfield %] (authority: [% authtypecode %])</h1>
164 <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>
165 <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>
166
167 <table>
168     <tr>
169         <th>Subfield</th>
170         <th>Text</th>
171         <th>Constraints</th>
172         <th>Delete</th>
173     </tr>
174     [% FOREACH loo IN loop %]
175     [% UNLESS ( loop.odd ) %]
176     <tr class="highlight">
177     [% ELSE %]
178     <tr>
179     [% END %]
180         <td>[% loo.tagsubfield %]</td>
181         <td>
182             [% IF ( loo.subfield_ignored ) %]
183                     <i>[% loo.liblibrarian %]</i>
184             [% ELSE %]
185                     [% loo.liblibrarian %]
186             [% END %]
187         </td>
188         <td>
189             [% IF ( loo.subfield_ignored ) %]
190                     <i>subfield ignored</i>
191             [% ELSE %]
192                 <strong>Tab:</strong>[% loo.tab %],
193                 [% IF ( loo.kohafield ) %] | <strong>Koha field:</strong> [% loo.kohafield %], [% END %]
194                 [% IF ( loo.repeatable ) %]Repeatable, [% ELSE %]Not repeatable,
195                 [% END %]
196                         [% IF ( loo.mandatory ) %]Mandatory, [% ELSE %]Not mandatory,
197                 [% END %]
198                         [% IF ( loo.hidden ) %]hidden,
199                 [% END %]
200                         [% IF ( loo.isurl ) %]is a url,
201                 [% END %]
202                         [% IF ( loo.authorised_value ) %] | <strong>Auth value:</strong>[% loo.authorised_value %],
203                 [% END %]
204                         [% IF ( loo.frameworkcode ) %] | <strong>Authority:</strong>[% loo.frameworkcode %],
205                 [% END %]
206                 [% IF ( loo.value_builder ) %] | <strong>Plugin:</strong>[% loo.value_builder %],[% END %]
207             [% END %]
208         </td>
209         <td><a href="[% loo.delete %]">Delete</a></td>
210     </tr>
211     [% END %]
212 </table>
213
214     <form action="[% script_name %]" method="get">
215     <fieldset class="action"><input type="hidden" name="op" value="add_form" />
216     <input type="hidden" name="tagfield" value="[% edit_tagfield %]" />
217     <input type="hidden" name="authtypecode" value="[% edit_authtypecode %]" />
218     <input type="submit" value="Edit subfields" />
219     <a class="cancel" href="auth_tag_structure.pl?searchfield=[% tagfield %]&amp;authtypecode=[% authtypecode %]">Cancel</a></fieldset>
220     </form>
221
222     [% IF ( previous ) %]
223     <input type="image" src="[% interface %]/[% theme %]/images/1leftarrow.png" title="previous" alt="previous" border="0" />
224     </a>
225     [% END %]
226     [% IF ( next ) %]
227         [% next %]
228     <input type="image" src="[% interface %]/[% theme %]/images/1rightarrow.png" title="next" alt="next" border="0" />
229     </a>
230     [% END %]
231
232 [% END %]
233
234 </div>
235 </div>
236 <div class="yui-b">
237 [% INCLUDE 'admin-menu.inc' %]
238 </div>
239 </div>
240 [% INCLUDE 'intranet-bottom.inc' %]