get_additional_field_values_for_template method New method to be utilized for retrieval of additional fields of any class that implements it. This is to be used when additional_fields are needed to be sent to .tt files for renderering. Both for form entries and read-only 'show' pages. Template files: Updated additional-fields-entry.inc: Now considers entry of repeatable fields. Repeatable text fields will have a "+New" link to allow for adding of a new instance of a repeatable field. Repeatable AV fields will be shown as checkboxes instead of a dropdown Update additional-fields-display.inc When displaying non-editable additional-fields, multiple instances for each field are now considered. Label now only shows if field has a non-null value in it. Option to show value_only Option to set if its to be displayed on a table cell Update histsearch.tt and filter-orders.inc Now calls additional-fields-entry.inc with search_form=1 to prevent repetable "+New" controls from showing on search inputs. additional-fields-entry.js New JS asset to be called by template files who require additional-fields-entry.inc for repeatable fields controls. This also handles the need for having the marcfield of type 'get' submitted if it is a disabled dropdown (AV marc field) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
25 lines
840 B
HTML
25 lines
840 B
HTML
[% USE AuthorisedValues %]
|
|
[% FOR field IN available %]
|
|
[% IF is_table_cell %]
|
|
<td>
|
|
[% END %]
|
|
[% SET values_list = [] %]
|
|
[% FOR value IN values.${field.id} %]
|
|
[% IF field.authorised_value_category %]
|
|
[% values_list.push(AuthorisedValues.GetByCode( field.authorised_value_category, value )) %]
|
|
[% ELSE %]
|
|
[% values_list.push(value) %]
|
|
[% END %]
|
|
[% END %]
|
|
[% IF value_only %]
|
|
[% values_list.join(', ') | html %]
|
|
[% ELSIF !values_list.empty %]
|
|
<li>
|
|
<span class="label"> [% field.name | html %]: </span>
|
|
[% values_list.join(', ') | html %]
|
|
</li>
|
|
[% END %]
|
|
[% IF is_table_cell %]
|
|
</td>
|
|
[% END %]
|
|
[% END %]
|