Lines 1-6
Link Here
|
1 |
[% USE raw %] |
1 |
[% USE raw %] |
2 |
[% USE Asset %] |
2 |
[% USE Asset %] |
3 |
[% USE AuthorisedValues %] |
3 |
[% USE AuthorisedValues %] |
|
|
4 |
[% USE Branches %] |
5 |
[% USE scalar %] |
4 |
[% SET footerjs = 1 %] |
6 |
[% SET footerjs = 1 %] |
5 |
[% INCLUDE 'doc-head-open.inc' %] |
7 |
[% INCLUDE 'doc-head-open.inc' %] |
6 |
<title>Koha › Administration › Patron attribute types |
8 |
<title>Koha › Administration › Patron attribute types |
Lines 60-69
Link Here
|
60 |
<fieldset class="rows"> |
62 |
<fieldset class="rows"> |
61 |
<ol> |
63 |
<ol> |
62 |
<li> |
64 |
<li> |
63 |
[% IF ( edit_attribute_type ) %] |
65 |
[% IF attribute_type %] |
64 |
<span class="label">Patron attribute type code: </span> |
66 |
<span class="label">Patron attribute type code: </span> |
65 |
<input type="hidden" name="code" value="[% code | html %]" /> |
67 |
<input type="hidden" name="code" value="[% attribute_type.code |html %]" /> |
66 |
[% code | html %] |
68 |
[% attribute_type.code |html %] |
67 |
[% ELSE %] |
69 |
[% ELSE %] |
68 |
<label for="code" class="required">Patron attribute type code: </label> |
70 |
<label for="code" class="required">Patron attribute type code: </label> |
69 |
<input type="text" id="code" name="code" required="required" class="required" size="10" maxlength="10" /> |
71 |
<input type="text" id="code" name="code" required="required" class="required" size="10" maxlength="10" /> |
Lines 71-115
Link Here
|
71 |
[% END %] |
73 |
[% END %] |
72 |
</li> |
74 |
</li> |
73 |
<li><label for="description" class="required">Description: </label> |
75 |
<li><label for="description" class="required">Description: </label> |
74 |
<input type="text" id="description" name="description" required="required" class="required" size="50" maxlength="250" value="[% description | html %]" /> |
76 |
<input type="text" id="description" name="description" required="required" class="required" size="50" maxlength="250" value="[% attribute_type.description |html %]" /> |
75 |
<span class="required">Required</span> |
77 |
<span class="required">Required</span> |
76 |
</li> |
78 |
</li> |
77 |
<li><label for="repeatable">Repeatable: </label> |
79 |
<li><label for="repeatable">Repeatable: </label> |
78 |
[% IF ( repeatable_checked ) %] |
80 |
[% IF attribute_type %] |
79 |
[% IF ( repeatable_disabled ) %] |
81 |
[% IF attribute_type.repeatable %] |
80 |
<input type="checkbox" id="repeatable" name="repeatable" checked="checked" disabled="disabled" /> |
82 |
<input type="checkbox" id="repeatable" name="repeatable" checked="checked" disabled="disabled" /> |
81 |
[% ELSE %] |
83 |
[% ELSE %] |
82 |
<input type="checkbox" id="repeatable" name="repeatable" checked="checked" /> |
84 |
<input type="checkbox" id="repeatable" name="repeatable" disabled="disabled" /> |
83 |
[% END %] |
85 |
[% END %] |
84 |
[% ELSE %] |
86 |
[% ELSE %] |
85 |
[% IF ( repeatable_disabled ) %] |
|
|
86 |
<input type="checkbox" id="repeatable" name="repeatable" disabled="disabled" /> |
87 |
[% ELSE %] |
88 |
<input type="checkbox" id="repeatable" name="repeatable" /> |
87 |
<input type="checkbox" id="repeatable" name="repeatable" /> |
89 |
[% END %] |
|
|
90 |
[% END %] |
88 |
[% END %] |
91 |
<span>Check to let a patron record have multiple values of this attribute. |
89 |
<span>Check to let a patron record have multiple values of this attribute. |
92 |
This setting cannot be changed after an attribute is defined.</span> |
90 |
This setting cannot be changed after an attribute is defined.</span> |
93 |
</li> |
91 |
</li> |
94 |
<li><label for="unique_id">Unique identifier: </label> |
92 |
<li><label for="unique_id">Unique identifier: </label> |
95 |
[% IF ( unique_id_checked ) %] |
93 |
[% IF attribute_type %] |
96 |
[% IF ( unique_id_disabled ) %] |
94 |
[% IF attribute_type.unique_id %] |
97 |
<input type="checkbox" id="unique_id" name="unique_id" checked="checked" disabled="disabled" /> |
95 |
<input type="checkbox" id="unique_id" name="unique_id" checked="checked" disabled="disabled" /> |
98 |
[% ELSE %] |
96 |
[% ELSE %] |
99 |
<input type="checkbox" id="unique_id" name="unique_id" checked="checked" /> |
97 |
<input type="checkbox" id="unique_id" name="unique_id" disabled="disabled" /> |
100 |
[% END %] |
98 |
[% END %] |
101 |
[% ELSE %] |
99 |
[% ELSE %] |
102 |
[% IF ( unique_id_disabled ) %] |
|
|
103 |
<input type="checkbox" id="unique_id" name="unique_id" disabled="disabled" /> |
104 |
[% ELSE %] |
105 |
<input type="checkbox" id="unique_id" name="unique_id" /> |
100 |
<input type="checkbox" id="unique_id" name="unique_id" /> |
106 |
[% END %] |
|
|
107 |
[% END %] |
101 |
[% END %] |
108 |
<span>If checked, attribute will be a unique identifier — if a value is given to a patron record, the same value |
102 |
<span>If checked, attribute will be a unique identifier — if a value is given to a patron record, the same value |
109 |
cannot be given to a different record. This setting cannot be changed after an attribute is defined.</span> |
103 |
cannot be given to a different record. This setting cannot be changed after an attribute is defined.</span> |
110 |
</li> |
104 |
</li> |
111 |
<li><label for="opac_display">Display in OPAC: </label> |
105 |
<li><label for="opac_display">Display in OPAC: </label> |
112 |
[% IF ( opac_display_checked ) %] |
106 |
[% IF attribute_type AND attribute_type.opac_display %] |
113 |
<input type="checkbox" id="opac_display" name="opac_display" checked="checked" /> |
107 |
<input type="checkbox" id="opac_display" name="opac_display" checked="checked" /> |
114 |
[% ELSE %] |
108 |
[% ELSE %] |
115 |
<input type="checkbox" id="opac_display" name="opac_display" /> |
109 |
<input type="checkbox" id="opac_display" name="opac_display" /> |
Lines 117-123
Link Here
|
117 |
<span>Check to display this attribute on a patron's details page in the OPAC.</span> |
111 |
<span>Check to display this attribute on a patron's details page in the OPAC.</span> |
118 |
</li> |
112 |
</li> |
119 |
<li><label for="opac_editable">Editable in OPAC: </label> |
113 |
<li><label for="opac_editable">Editable in OPAC: </label> |
120 |
[% IF ( opac_editable_checked ) %] |
114 |
[% IF attribute_type AND attribute_type.opac_editable %] |
121 |
<input type="checkbox" id="opac_editable" name="opac_editable" checked="checked" /> |
115 |
<input type="checkbox" id="opac_editable" name="opac_editable" checked="checked" /> |
122 |
[% ELSE %] |
116 |
[% ELSE %] |
123 |
<input type="checkbox" id="opac_editable" name="opac_editable" /> |
117 |
<input type="checkbox" id="opac_editable" name="opac_editable" /> |
Lines 125-131
Link Here
|
125 |
<span>Check to allow patrons to edit this attribute from their details page in the OPAC. (Requires above, does not work with <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=PatronSelfRegistrationVerifyByEmail" target="_blank">PatronSelfRegistrationVerifyByEmail</a>.)</span> |
119 |
<span>Check to allow patrons to edit this attribute from their details page in the OPAC. (Requires above, does not work with <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=PatronSelfRegistrationVerifyByEmail" target="_blank">PatronSelfRegistrationVerifyByEmail</a>.)</span> |
126 |
</li> |
120 |
</li> |
127 |
<li><label for="staff_searchable">Searchable: </label> |
121 |
<li><label for="staff_searchable">Searchable: </label> |
128 |
[% IF ( staff_searchable_checked ) %] |
122 |
[% IF attribute_type AND attribute_type.staff_searchable %] |
129 |
<input type="checkbox" id="staff_searchable" name="staff_searchable" checked="checked" /> |
123 |
<input type="checkbox" id="staff_searchable" name="staff_searchable" checked="checked" /> |
130 |
[% ELSE %] |
124 |
[% ELSE %] |
131 |
<input type="checkbox" id="staff_searchable" name="staff_searchable" /> |
125 |
<input type="checkbox" id="staff_searchable" name="staff_searchable" /> |
Lines 133-139
Link Here
|
133 |
<span>Check to make this attribute staff_searchable in the staff patron search.</span> |
127 |
<span>Check to make this attribute staff_searchable in the staff patron search.</span> |
134 |
</li> |
128 |
</li> |
135 |
<li><label for="display_checkout">Display in check-out: </label> |
129 |
<li><label for="display_checkout">Display in check-out: </label> |
136 |
[% IF display_checkout_checked %] |
130 |
[% IF attribute_type AND attribute_type.display_checkout %] |
137 |
<input type="checkbox" id="display_checkout" name="display_checkout" checked="checked" /> |
131 |
<input type="checkbox" id="display_checkout" name="display_checkout" checked="checked" /> |
138 |
[% ELSE %] |
132 |
[% ELSE %] |
139 |
<input type="checkbox" id="display_checkout" name="display_checkout" /> |
133 |
<input type="checkbox" id="display_checkout" name="display_checkout" /> |
Lines 144-150
Link Here
|
144 |
<li><label for="authorised_value_category">Authorized value category: </label> |
138 |
<li><label for="authorised_value_category">Authorized value category: </label> |
145 |
<select name="authorised_value_category" id="authorised_value_category"> |
139 |
<select name="authorised_value_category" id="authorised_value_category"> |
146 |
<option value=""></option> |
140 |
<option value=""></option> |
147 |
[% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => authorised_value_category ) %] |
141 |
[% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => attribute_type.authorised_value_category ) %] |
148 |
</select> |
142 |
</select> |
149 |
<span>Authorized value category; if one is selected, the patron record input page will only allow values |
143 |
<span>Authorized value category; if one is selected, the patron record input page will only allow values |
150 |
to be chosen from the authorized value list. However, an authorized value list is not |
144 |
to be chosen from the authorized value list. However, an authorized value list is not |
Lines 153-165
Link Here
|
153 |
<li><label for="branches">Branches limitation: </label> |
147 |
<li><label for="branches">Branches limitation: </label> |
154 |
<select id="branches" name="branches" multiple size="10"> |
148 |
<select id="branches" name="branches" multiple size="10"> |
155 |
<option value="">All branches</option> |
149 |
<option value="">All branches</option> |
156 |
[% FOREACH branch IN branches_loop %] |
150 |
[% PROCESS options_for_libraries libraries => Branches.all( selecteds => attribute_type.library_limits ) %] |
157 |
[% IF ( branch.selected ) %] |
|
|
158 |
<option selected="selected" value="[% branch.branchcode | html %]">[% branch.branchname | html %]</option> |
159 |
[% ELSE %] |
160 |
<option value="[% branch.branchcode | html %]">[% branch.branchname | html %]</option> |
161 |
[% END %] |
162 |
[% END %] |
163 |
</select> |
151 |
</select> |
164 |
<span>Select All if this attribute type must to be displayed all the time. Otherwise select libraries you want to associate with this value. |
152 |
<span>Select All if this attribute type must to be displayed all the time. Otherwise select libraries you want to associate with this value. |
165 |
</span> |
153 |
</span> |
Lines 169-195
Link Here
|
169 |
<select name="category_code" id="category"> |
157 |
<select name="category_code" id="category"> |
170 |
<option value=""></option> |
158 |
<option value=""></option> |
171 |
[% FOREACH cat IN categories %] |
159 |
[% FOREACH cat IN categories %] |
172 |
[% IF ( cat.categorycode == category_code ) %]<option value="[% cat.categorycode | html %]" selected="selected">[% cat.description | html %]</option>[% ELSE %]<option value="[% cat.categorycode | html %]">[% cat.description | html %]</option>[% END %] |
160 |
[% IF ( cat.categorycode == attribute_type.category_code ) %]<option value="[% cat.categorycode | html %]" selected="selected">[% cat.description |html %]</option>[% ELSE %]<option value="[% cat.categorycode | html %]">[% cat.description |html %]</option>[% END %] |
173 |
[% END %] |
161 |
[% END %] |
174 |
</select> |
162 |
</select> |
175 |
<span>Choose one to limit this attribute to one patron type. Please leave blank if you want these attributes to be available for all types of patrons.</span> |
163 |
<span>Choose one to limit this attribute to one patron type. Please leave blank if you want these attributes to be available for all types of patrons.</span> |
176 |
</li> |
164 |
</li> |
177 |
<li> |
165 |
<li> |
178 |
<label for="class">Class: </label> |
166 |
<label for="class">Class: </label> |
179 |
<select name="class" id="class"> |
167 |
[% PROCESS 'av-build-dropbox.inc' name="class", category="PA_CLASS" default=attribute_type.class %] |
180 |
<option value=""></option> |
|
|
181 |
[% FOREACH class IN classes_val_loop %] |
182 |
[% IF class.authorised_value == category_class %] |
183 |
<option value="[% class.authorised_value | html %]" selected="selected"> |
184 |
[% class.lib | html %] |
185 |
</option> |
186 |
[% ELSE %] |
187 |
<option value="[% class.authorised_value | html %]" > |
188 |
[% class.lib | html %] |
189 |
</option> |
190 |
[% END %] |
191 |
[% END %] |
192 |
</select> |
193 |
<span>Group attributes types with a block title (based on authorized values category 'PA_CLASS')</span> |
168 |
<span>Group attributes types with a block title (based on authorized values category 'PA_CLASS')</span> |
194 |
</li> |
169 |
</li> |
195 |
</ol> |
170 |
</ol> |
Lines 259-274
Link Here
|
259 |
<td>[% item.code | html %]</td> |
234 |
<td>[% item.code | html %]</td> |
260 |
<td>[% item.description | html %]</td> |
235 |
<td>[% item.description | html %]</td> |
261 |
<td> |
236 |
<td> |
262 |
[% IF ( item.branches && item.branches.size > 0 ) %] |
237 |
[% SET libraries = item.library_limits %] |
|
|
238 |
[% IF ( libraries && libraries.count > 0 ) %] |
263 |
[% branches_str = "" %] |
239 |
[% branches_str = "" %] |
264 |
[% FOREACH branch IN item.branches %] |
240 |
[% FOREACH branch IN libraries %] |
265 |
[% branches_str = branches_str _ " " _ branch.branchname _ "(" _ branch.branchcode _ ")" %] |
241 |
[% branches_str = branches_str _ " " _ branch.branchname _ "(" _ branch.branchcode _ ")" %] |
266 |
[% END %] |
242 |
[% END %] |
267 |
<span title="[% branches_str | html %]"> |
243 |
<span title="[% branches_str | html %]"> |
268 |
[% IF item.branches.size > 1 %] |
244 |
[% IF libraries.count > 1 %] |
269 |
[% item.branches.size | html %] branches limitations |
245 |
[% libraries.count | html %] branches limitations |
270 |
[% ELSE %] |
246 |
[% ELSE %] |
271 |
[% item.branches.size | html %] branch limitation |
247 |
[% libraries.count | html %] branch limitation |
272 |
[% END %] |
248 |
[% END %] |
273 |
</span> |
249 |
</span> |
274 |
[% ELSE %] |
250 |
[% ELSE %] |
Lines 276-283
Link Here
|
276 |
[% END %] |
252 |
[% END %] |
277 |
</td> |
253 |
</td> |
278 |
<td class="actions"> |
254 |
<td class="actions"> |
279 |
<a class="btn btn-default btn-xs" href="[% item.script_name | url %]?op=edit_attribute_type&code=[% item.code | uri %]"><i class="fa fa-pencil"></i> Edit</a> |
255 |
<a class="btn btn-default btn-xs" href="[% script_name | url %]?op=edit_attribute_type&code=[% item.code | uri %]"><i class="fa fa-pencil"></i> Edit</a> |
280 |
<a class="btn btn-default btn-xs" href="[% item.script_name | url %]?op=delete_attribute_type&code=[% item.code | uri %]"><i class="fa fa-trash"></i> Delete</a> |
256 |
<a class="btn btn-default btn-xs" href="[% script_name | url %]?op=delete_attribute_type&code=[% item.code | uri %]"><i class="fa fa-trash"></i> Delete</a> |
281 |
</td> |
257 |
</td> |
282 |
</tr> |
258 |
</tr> |
283 |
[% END %] |
259 |
[% END %] |