From a2275d64bfd4feeef07aff11ff02d76ce5fb4319 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 24 Oct 2013 16:15:57 +0200 Subject: [PATCH] Bug 10855: FIX: Add additional fields for closed subscriptions --- .../prog/en/modules/serials/serials-search.tt | 29 ++++++++++++++------ serials/serials-search.pl | 2 +- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt index 77a7cc0..5f826c7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt @@ -97,16 +97,16 @@ [% FOR field IN additional_fields_for_subscription %]
  • - + [% IF field.authorised_value_choices %] - [% FOREACH av IN field.authorised_value_choices %] [% END %] [% ELSE %] - + [% END %]
  • [% END %] @@ -185,8 +185,6 @@ [% IF ( subscription.enddate ) %][% subscription.enddate | $KohaDates %][% END %] - [% IF ( routing && CAN_user_serials_routing ) %] - [% END %] [% FOR field IN additional_fields_for_subscription %] [% IF field.authorised_value_category %] [% KohaAuthorisedValues.GetByCode( field.authorised_value_category, subscription.additional_fields.${field.name} ) %] @@ -196,6 +194,7 @@ [% END %] Issue history + [% IF ( routing && CAN_user_serials_routing ) %] [% IF ( subscription.cannotedit ) %]   @@ -208,6 +207,7 @@ [% END %] [% END %] + [% END %] [% IF ( CAN_user_serials_receive_serials ) %] Serial receive @@ -235,6 +235,9 @@ Notes Library Call number + [% FOR field IN additional_fields_for_subscription %] + [% field.name %] + [% END %]     @@ -246,6 +249,9 @@ + [% FOR field IN additional_fields_for_subscription %] + + [% END %] @@ -272,6 +278,13 @@ [% IF ( subscription.callnumber ) %][% subscription.callnumber %][% END %] + [% FOR field IN additional_fields_for_subscription %] + [% IF field.authorised_value_category %] + [% KohaAuthorisedValues.GetByCode( field.authorised_value_category, subscription.additional_fields.${field.name} ) %] + [% ELSE %] + [% subscription.additional_fields.${field.name} %] + [% END %] + [% END %] [% UNLESS subscription.cannotedit %] Reopen @@ -348,9 +361,9 @@ [% FOR field IN additional_fields_for_subscription %]
  • - + [% IF field.authorised_value_choices %] - [% FOREACH av IN field.authorised_value_choices %] [% IF av.authorised_value == additional_field_filters.${field.name} %] @@ -361,7 +374,7 @@ [% END %] [% ELSE %] - + [% END %]
  • [% END %] diff --git a/serials/serials-search.pl b/serials/serials-search.pl index 7b3967d..50dab9a 100755 --- a/serials/serials-search.pl +++ b/serials/serials-search.pl @@ -76,7 +76,7 @@ if ( $op and $op eq "close" ) { my $additional_fields = Koha::AdditionalField->all( { table => 'subscription', searchable => 1 } ); my $additional_field_filters; for my $field ( @$additional_fields ) { - if ( my $filter_value = $query->param('additional_field_' . $field->{name} . '_filter') ) { + if ( my $filter_value = $query->param('additional_field_' . $field->{id} . '_filter') ) { $additional_field_filters->{ $field->{name} } = $filter_value; } if ( $field->{authorised_value_category} ) { -- 1.7.10.4