<div class="yui-b">
[% IF ( WARNING_extended_attributes_off ) %]
-<div class="dialog message">Because the 'ExtendedPatronAttributes` system preference is currently not enabled, extended patron attributes cannot be given to patron records. Go <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ExtendedPatronAttributes">here</a> if you wish to enable this feature.</div>
+<div class="dialog message">Because the 'ExtendedPatronAttributes` system preference is currently not enabled, extended patron attributes cannot be given to patron records. Go <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ExtendedPatronAttributes">here</a> if you wish to enable this feature.</div>
[% END %]
[% IF ( attribute_type_form ) %]
[% END %]
<span>Check to make this attribute staff_searchable in the staff patron search.</span>
</li>
+ <li><label for="display_checkout">Display in check-out: </label>
+ [% IF display_checkout_checked %]
+ <input type="checkbox" id="display_checkout" name="display_checkout" checked="checked" />
+ [% ELSE %]
+ <input type="checkbox" id="display_checkout" name="display_checkout" />
+ [% END %]
+ <span>Check to show this attribute in patron check-out.</span>
+ </li>
+
<li><label for="authorised_value_category">Authorized value category: </label>
<select name="authorised_value_category" id="authorised_value_category">
<option value=""></option>
to be chosen from the authorized value list. However, an authorized value list is not
enforced during batch patron import.</span>
</li>
+ <li>
+ <label for="category">Category: </label>
+ <select name="category_code" id="category">
+ <option value=""></option>
+ [% FOREACH cat IN categories %]
+ [% IF ( cat.categorycode == category_code ) %]<option value="[% cat.categorycode %]" selected="selected">[% cat.description %]</option>[% ELSE %]<option value="[% cat.categorycode %]">[% cat.description %]</option>[% END %]
+ [% END %]
+ </select>
+ <span>Please let blank if you want these attributs to be for all types of patron. Else, select one type.</span>
+ </li>
+ <li>
+ <label for="class">Class: </label>
+ <select name="class">
+ <option value="" />
+ [% FOREACH class IN classes_val_loop %]
+ [% IF ( class.selected ) %]
+ <option value="[% class.authorised_value %]" selected="selected">
+ [% class.lib %]
+ </option>
+ [% ELSE %]
+ <option value="[% class.authorised_value %]" >
+ [% class.lib %]
+ </option>
+ [% END %]
+ [% END %]
+ </select>
+ <span>Group attributes types with a block title (based on Authorised values category 'PA_CLASS')</span>
+ </li>
</ol>
</fieldset>
<fieldset class="action">
<div class="dialog message">Could not delete patron attribute type "[% ERROR_delete_not_found %]"
— it was already absent from the database.</div>
[% END %]
-[% IF ( available_attribute_types ) %]<table>
- <tr>
- <th>Code</th>
- <th>Description</th>
- <th>Actions</th>
- </tr>
- [% FOREACH available_attribute_type IN available_attribute_types %]
- <tr>
- <td>[% available_attribute_type.code |html %]</td>
- <td>[% available_attribute_type.description %]</td>
- <td>
- <a href="[% available_attribute_type.script_name %]?op=edit_attribute_type&code=[% available_attribute_type.code |html %]">Edit</a>
- <a href="[% available_attribute_type.script_name %]?op=delete_attribute_type&code=[% available_attribute_type.code |html %]">Delete</a>
- </td>
- </tr>
+[% IF ( available_attribute_types ) %]
+ [% FOREACH attribute IN available_attribute_types %]
+ [% IF attribute.class %]
+ <h4>[% attribute.lib %]</h4>
+ [% END %]
+ <table class="patron_attributes_types">
+ <thead>
+ <tr>
+ <th>Code</th>
+ <th>Description</th>
+ <th>Actions</th>
+ </tr>
+ </thead>
+ <tbody>
+ [% FOREACH item IN attribute.items %]
+ <tr>
+ <td>[% item.code |html %]</td>
+ <td>[% item.description %]</td>
+ <td>
+ <a href="[% item.script_name %]?op=edit_attribute_type&code=[% item.code |html %]">Edit</a>
+ <a href="[% item.script_name %]?op=delete_attribute_type&code=[% item.code |html %]">Delete</a>
+ </td>
+ </tr>
+ [% END %]
+ </tbody>
+ </table>
[% END %]
-</table>[% ELSE %]<p>There are no saved patron attribute types.</p>[% END %]
+[% ELSE %]
+ <p>There are no saved patron attribute types.</p>
+[% END %]
<div class="pages">[% pagination_bar %]</div>