Line 0
Link Here
|
|
|
1 |
[% BLOCK setsubfield %][% FILTER collapse %] |
2 |
[% IF ( loo.tagsubfield ) %] |
3 |
[% SET subfield = loo.tagsubfield %] |
4 |
[% ELSE %] |
5 |
[% SET subfield = loo.subfieldcode %] |
6 |
[% END %] |
7 |
[% END %][% END %] |
8 |
|
9 |
<div id="subfieldtabs" class="toptabs numbered"> |
10 |
<ul class="nav nav-tabs" role="tablist"> |
11 |
[% FOREACH loo IN loop %] |
12 |
[% PROCESS setsubfield %] |
13 |
<li id="tab_subfield_[%- PROCESS outputsubfield subfieldanchor = subfield -%]" class="tab-item" role="presentation"> |
14 |
[% IF ( loo.new_subfield ) %] |
15 |
<a href="#sub[%- PROCESS outputsubfield subfieldanchor = subfield -%]field" aria-controls="sub[%- PROCESS outputsubfield subfieldanchor = subfield -%]field" role="tab" data-toggle="tab" title="[% loo.liblibrarian | html_entity %]">New</a> |
16 |
[% ELSE %] |
17 |
<a href="#sub[%- PROCESS outputsubfield subfieldanchor = subfield -%]field" aria-controls="sub[%- PROCESS outputsubfield subfieldanchor = subfield -%]field" role="tab" data-toggle="tab" title="[% loo.liblibrarian | html_entity %]"> |
18 |
[% subfield | html %] |
19 |
</a> |
20 |
[% END %] |
21 |
</li> |
22 |
[% END %] |
23 |
</ul> |
24 |
|
25 |
<div class="tab-content"> |
26 |
|
27 |
[% FOREACH loo IN loop %] |
28 |
[% PROCESS setsubfield %] |
29 |
<div class="constraints tab-pane" role="tabpanel" id="sub[%- PROCESS outputsubfield subfieldanchor = subfield -%]field"> |
30 |
<input type="hidden" name="tab_id" value="[% loo.row | html %]" /> |
31 |
<div id="basic[%- PROCESS outputsubfield subfieldanchor = subfield -%]field" class="constraints"> |
32 |
<fieldset class="rows"> |
33 |
<legend>Basic constraints</legend> |
34 |
<ol> |
35 |
[% IF ( subfield == 0 || subfield ) %] |
36 |
<li> |
37 |
<span class="label">Subfield code:</span> |
38 |
[% subfield | html %] |
39 |
<input type="hidden" name="tagsubfield" value="[% subfield | html %]" /> |
40 |
</li> |
41 |
[% ELSE %] |
42 |
<li> |
43 |
<label for="tagsubfield[% loo.row | html %]">Subfield code:</label> |
44 |
<input type="text" id="tagsubfield[% loo.row | html %]" name="tagsubfield" value="[% subfield | html %]" /> |
45 |
</li> |
46 |
[% END %] |
47 |
<li> |
48 |
<label for="liblibrarian[% loo.row | html %]">Text for librarian: </label> |
49 |
<input id="liblibrarian[% loo.row | html %]" type="text" name="liblibrarian_[% loo.row | html %]" value="[% loo.liblibrarian | html_entity %]" size="40" maxlength="80" /> |
50 |
</li> |
51 |
<li> |
52 |
<label for="libopac_[% loo.row | html %]">Text for OPAC: </label> |
53 |
<input type="text" id="libopac_[% loo.row | html %]" name="libopac_[% loo.row | html %]" value="[% loo.libopac | html_entity %]" size="40" maxlength="80" /> |
54 |
</li> |
55 |
<li> |
56 |
<label for="repeatable[% loo.row | html %]">Repeatable: </label> |
57 |
[% IF loo.repeatable %] |
58 |
<input type="checkbox" id="repeatable[% loo.row | html %]" name="repeatable_[% loo.row | html %]" checked="checked" value="1" /> |
59 |
[% ELSE %] |
60 |
<input type="checkbox" id="repeatable[% loo.row | html %]" name="repeatable_[% loo.row | html %]" value="1" /> |
61 |
[% END %] |
62 |
</li> |
63 |
<li> |
64 |
<label for="mandatory[% loo.row | html %]">Mandatory: </label> |
65 |
[% IF loo.mandatory %] |
66 |
<input type="checkbox" id="mandatory[% loo.row | html %]" name="mandatory_[% loo.row | html %]" checked="checked" value="1" /> |
67 |
[% ELSE %] |
68 |
<input type="checkbox" id="mandatory[% loo.row | html %]" name="mandatory_[% loo.row | html %]" value="1" /> |
69 |
[% END %] |
70 |
</li> |
71 |
[% IF ( biblioframework ) %] |
72 |
<li> |
73 |
<label for="important[% loo.row | html %]">Important: </label> |
74 |
[% IF loo.important %] |
75 |
<input type="checkbox" id="important[% loo.row | html %]" name="important_[% loo.row | html %]" checked="checked" value="1" /> |
76 |
[% ELSE %] |
77 |
<input type="checkbox" id="important[% loo.row | html %]" name="important_[% loo.row | html %]" value="1" /> |
78 |
[% END %] |
79 |
</li> |
80 |
[% END %] |
81 |
<li> |
82 |
<label for="tab[% loo.row | html %]">Managed in tab: </label> |
83 |
<select name="tab_[% loo.row | html %]" id="tab[% loo.row | html %]"> |
84 |
[%- IF ( loo.tab == -1 ) -%] |
85 |
<option value="-1" selected="selected">ignore</option> |
86 |
[%- ELSE -%] |
87 |
<option value="-1">ignore</option> |
88 |
[%- END -%] |
89 |
[%- FOREACH t IN [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'] -%] |
90 |
[%- IF ( loo.tab == t ) -%] |
91 |
<option value="[%- t | html -%]" selected="selected">[%- t | html -%]</option> |
92 |
[%- ELSE -%] |
93 |
<option value="[%- t | html -%]">[%- t | html -%]</option> |
94 |
[%- END -%] |
95 |
[%- END -%] |
96 |
[%- IF ( biblioframework ) %] |
97 |
[% SET tabten = t("Items (10)") %] |
98 |
[% ELSE %] |
99 |
[% SET tabten = "10" %] |
100 |
[% END %] |
101 |
[%- IF ( loo.tab == 10 ) -%] |
102 |
<option value="10" selected="selected">[% tabten | html %]</option> |
103 |
[%- ELSE -%] |
104 |
<option value="10">[% tabten | html %]</option> |
105 |
[%- END -%] |
106 |
</select> |
107 |
<div class="hint"><i class="fa fa-warning"></i> <span>Ignore means that the subfield does not display in the record editor and that its value, if any, is deleted from the record</span></div> |
108 |
</li> |
109 |
</ol> |
110 |
</fieldset><!-- /.rows --> |
111 |
</div> <!-- /#basic[%- PROCESS outputsubfield subfieldanchor = subfieldcode -%] --> |
112 |
|
113 |
<div id="advanced[%- PROCESS outputsubfield subfieldanchor = subfield -%]" class="constraints"> |
114 |
<fieldset class="rows"> |
115 |
<legend>Advanced constraints</legend> |
116 |
<ol> |
117 |
<li> |
118 |
<label for="defaultvalue[% loo.row | html %]">Default value:</label> |
119 |
<input type="text" name="defaultvalue_[% loo.row | html %]" id="defaultvalue[% loo.row | html %]" value="[% loo.defaultvalue | html %]" /> |
120 |
</li> |
121 |
[% IF ( biblioframework ) %] |
122 |
<li> |
123 |
<label for="maxlength[% loo.row | html %]">Max length:</label> |
124 |
<input type="text" id="maxlength[% loo.row | html %]" name="maxlength_[% loo.row | html %]" value="[% loo.maxlength | html %]" size="4" /> |
125 |
</li> |
126 |
[% END %] |
127 |
<li> |
128 |
<label for="hidden[% loo.row | html %]">Visibility:</label> |
129 |
[% IF ( biblioframework ) %] |
130 |
[% IF loo.hidden_protected %] |
131 |
<input type="hidden" id="hidden-[% loo.row | html %]" name="hidden_[% loo.row | html %]" value="[% loo.hidden | html %]" data-koha-protected="1" /> |
132 |
[% ELSE %] |
133 |
<input type="hidden" id="hidden-[% loo.row | html %]" name="hidden_[% loo.row | html %]" value="[% loo.hidden | html %]" /> |
134 |
[% END %] |
135 |
<input type="checkbox" id="hidden_opac_[% loo.row | html %]" class="inclusive_[% loo.row | html %]" name="hidden_opac_[% loo.row | html %]"/> |
136 |
<label for="hidden_opac_[% loo.row | html %]" style="float: none;">OPAC</label> |
137 |
<input type="checkbox" id="hidden_intranet_[% loo.row | html %]" class="inclusive_[% loo.row | html %]" name="hidden_intranet_[% loo.row | html %]"/> |
138 |
<label for="hidden_intranet_[% loo.row | html %]" style="float: none;">Staff interface</label> |
139 |
<input type="checkbox" id="hidden_editor_[% loo.row | html %]" class="inclusive_[% loo.row | html %]" name="hidden_editor_[% loo.row | html %]"/> |
140 |
<label for="hidden_editor_[% loo.row | html %]" style="float: none;">Editor</label> |
141 |
<input type="checkbox" id="hidden_collapsed_[% loo.row | html %]" class="inclusive_[% loo.row | html %]" name="hidden_collapsed_[% loo.row | html %]"/> |
142 |
<label for="hidden_collapsed_[% loo.row | html %]" style="float: none;">Collapsed</label> |
143 |
<input type="checkbox" id="hidden_flagged_[% loo.row | html %]" name="flagged_[% loo.row | html %]"/> |
144 |
<label for="hidden_flagged_[% loo.row | html %]" style="float: none;">Flagged</label> |
145 |
[% ELSE %] |
146 |
<select name="hidden_[% loo.row | html %]" id="hidden_[% loo.row | html %]"> |
147 |
[%- IF ( loo.hidden == 0 ) -%] |
148 |
<option value= "0" selected="selected">Show all</option> |
149 |
<option value="1">Hide all</option> |
150 |
[%- ELSE -%] |
151 |
[%# All other non-zero values mean: Hide %] |
152 |
<option value= "0">Show all</option> |
153 |
<option value="1" selected="selected">Hide all</option> |
154 |
[%- END -%] |
155 |
</select> |
156 |
[% END %] |
157 |
</li> |
158 |
<li> |
159 |
<label for="isurl[% loo.row | html %]">Is a URL:</label> |
160 |
[% IF loo.isurl %] |
161 |
<input type="checkbox" id="isurl[% loo.row | html %]" name="isurl_[% loo.row | html %]" checked="checked" value="1" /> |
162 |
[% ELSE %] |
163 |
<input type="checkbox" id="isurl[% loo.row | html %]" name="isurl_[% loo.row | html %]" value="1" /> |
164 |
[% END %] |
165 |
<span class="hint">If checked, it means that the subfield is a URL and can be clicked</span> |
166 |
</li> |
167 |
[% IF ( biblioframework ) %] |
168 |
<li> |
169 |
<label for="link[% loo.row | html %]">Link:</label> |
170 |
<input type="text" id="link[% loo.row | html %]" name="link_[% loo.row | html %]" value="[% loo.link | html %]" size="10" maxlength="80" /> |
171 |
<div class="hint">An index name, e.g. title or Local-Number</div> |
172 |
</li> |
173 |
[% END %] |
174 |
[% UNLESS ( biblioframework ) %] |
175 |
<li> |
176 |
<label for="kohafield[% loo.row | html %]">Koha link:</label> |
177 |
<select name="kohafield_[% loo.row | html %]" id="kohafield[% loo.row | html %]"> |
178 |
[%- FOREACH value IN loo.kohafields %] |
179 |
[% IF ( value == loo.kohafield && value.length>0 ) -%] |
180 |
<option value="[% value | html %]" selected="selected">[% value | html %]</option> |
181 |
[%- ELSIF ( value == loo.kohafield ) -%] |
182 |
<option value="[% value | html %]" selected="selected"> </option> |
183 |
[%- ELSIF ( value.length==0 ) -%] |
184 |
<option value="[% value | html %]"> </option> |
185 |
[%- ELSE -%] |
186 |
<option value="[% value | html %]">[% value | html %]</option> |
187 |
[%- END -%] |
188 |
[%- END %] |
189 |
</select> |
190 |
</li> |
191 |
[% END %] |
192 |
</ol> |
193 |
[% IF ( biblioframework ) %] |
194 |
<input type="hidden" name="kohafield_[% loo.row | html %]" value="[% loo.kohafield | html %]"/> |
195 |
[% END %] |
196 |
</fieldset> |
197 |
</div> <!-- /#advanced[%- PROCESS outputsubfield subfieldanchor = subfieldcode -%] --> |
198 |
|
199 |
<div id="oth[%- PROCESS outputsubfield subfieldanchor = subfield -%]" class="constraints"> |
200 |
<fieldset class="rows"> |
201 |
<legend>Other options (choose one)</legend> |
202 |
<ol> |
203 |
<li> |
204 |
<label for="authorised_value[% loo.row | html %]">Authorized value:</label> |
205 |
<select name="authorised_value_[% loo.row | html %]" id="authorised_value[% loo.row | html %]"> |
206 |
<option value=""></option> |
207 |
[% FOREACH value IN loo.authorised_values %] |
208 |
[% IF ( value == loo.authorised_value ) %] |
209 |
<option value="[% value | html %]" selected="selected">[% value | html %]</option> |
210 |
[% ELSE %] |
211 |
<option value="[% value | html %]">[% value | html %]</option> |
212 |
[% END %] |
213 |
[% END %] |
214 |
</select> |
215 |
</li> |
216 |
<li> |
217 |
[% IF ( biblioframework ) %] |
218 |
<label for="authtypecode[% loo.row | html %]">Thesaurus:</label> |
219 |
<select name="authtypecode_[% loo.row | html %]" id="authtypecode[% loo.row | html %]"> |
220 |
[% FOREACH value IN loo.authtypes %] |
221 |
[% IF ( value == loo.authtypecode ) %] |
222 |
<option value="[% value | html %]" selected="selected">[% value | html %]</option> |
223 |
[% ELSE %] |
224 |
<option value="[% value | html %]">[% value | html %]</option> |
225 |
[% END %] |
226 |
[% END %] |
227 |
</select> |
228 |
[% ELSE %] |
229 |
<label for="frameworkcode[% loo.row | html %]">Thesaurus:</label> |
230 |
<select name="frameworkcode" id="frameworkcode[% loo.row | html %]"> |
231 |
[%- FOREACH value IN loo.frameworkcodes %] |
232 |
[% IF ( value == loo.frameworkcode && value.length>0 ) -%] |
233 |
<option value="[% value | html %]" selected="selected">[% value | html %]</option> |
234 |
[%- ELSIF ( value == loo.frameworkcode ) -%] |
235 |
<option value="[% value | html %]" selected="selected"> </option> |
236 |
[%- ELSIF ( value.length==0 ) -%] |
237 |
<option value="[% value | html %]"> </option> |
238 |
[%- ELSE -%] |
239 |
<option value="[% value | html %]">[% value | html %]</option> |
240 |
[%- END -%] |
241 |
[%- END %] |
242 |
</select> |
243 |
[% END %] |
244 |
</li> |
245 |
<li> |
246 |
<label for="value_builder[% loo.row | html %]">Plugin:</label> |
247 |
<select name="value_builder_[% loo.row | html %]" id="value_builder[% loo.row | html %]"> |
248 |
[% FOREACH value IN loo.value_builders %] |
249 |
[% IF ( value == loo.value_builder ) %] |
250 |
<option value="[% value | html %]" selected="selected">[% value | html %]</option> |
251 |
[% ELSE %] |
252 |
<option value="[% value | html %]">[% value | html %]</option> |
253 |
[% END %] |
254 |
[% END %] |
255 |
</select> |
256 |
</li> |
257 |
</ol> |
258 |
</fieldset> <!-- /.rows --> |
259 |
</div> <!-- /#oth[%- PROCESS outputsubfield subfieldanchor = subfieldcode -%] --> |
260 |
</div><!-- /constraints --> |
261 |
[% END # /FOREACH loo %] |
262 |
</div> <!-- /.tab-content --> |
263 |
</div><!-- /subfieldtabs --> |