Bugzilla – Attachment 22607 Details for
Bug 10855
Custom fields for subscriptions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10855: FIX: Add additional fields for closed subscriptions
Bug-10855-FIX-Add-additional-fields-for-closed-sub.patch (text/plain), 7.81 KB, created by
Jonathan Druart
on 2013-10-30 15:29:01 UTC
(
hide
)
Description:
Bug 10855: FIX: Add additional fields for closed subscriptions
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2013-10-30 15:29:01 UTC
Size:
7.81 KB
patch
obsolete
>From fc540bf763ebc4ff06de6dbc652ccfd180cd3327 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >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 d7920b5..ad88335 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 @@ > </li> > [% FOR field IN additional_fields_for_subscription %] > <li> >- <label for="additional_field_[% field.name %]"> [% field.name %]: </label> >+ <label for="additional_field_[% field.id %]"> [% field.name %]: </label> > [% IF field.authorised_value_choices %] >- <select id="additional_field_[% field.name %]" name="additional_field_[% field.name %]_filter"> >+ <select id="additional_field_[% field.id %]" name="additional_field_[% field.id %]_filter"> > <option value="">All</option> > [% FOREACH av IN field.authorised_value_choices %] > <option value="[% av.authorised_value %]">[% av.lib %]</option> > [% END %] > </select> > [% ELSE %] >- <input id="additional_field_[% field.name %]" type="text" value="[% additional_fields.${field.name} %]" name="additional_field_[% field.name %]_filter" /> >+ <input id="additional_field_[% field.id %]" type="text" value="[% additional_fields.${field.name} %]" name="additional_field_[% field.id %]_filter" /> > [% END %] > </li> > [% END %] >@@ -184,8 +184,6 @@ > <td> > [% IF ( subscription.enddate ) %][% subscription.enddate | $KohaDates %][% END %] > </td> >- [% IF ( routing && CAN_user_serials_routing ) %] >- [% END %] > [% FOR field IN additional_fields_for_subscription %] > [% IF field.authorised_value_category %] > <td>[% KohaAuthorisedValues.GetByCode( field.authorised_value_category, subscription.additional_fields.${field.name} ) %]</td> >@@ -195,6 +193,7 @@ > [% END %] > <td><a href="/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=[% subscription.subscriptionid %]">Issue history</a> > </td> >+ [% IF ( routing && CAN_user_serials_routing ) %] > <td> > [% IF ( subscription.cannotedit ) %] > >@@ -207,6 +206,7 @@ > [% END %] > [% END %] > </td> >+ [% END %] > <td> > [% IF ( subscription.cannotedit ) %] > >@@ -235,6 +235,9 @@ > <th> Notes </th> > <th>Library</th> > <th>Call number</th> >+ [% FOR field IN additional_fields_for_subscription %] >+ <th>[% field.name %]</th> >+ [% END %] > <th> </th> > <th> </th> > </tr> >@@ -246,6 +249,9 @@ > <td><input type="text" class="filter" data-column_num="2" placeholder="Search notes" /></td> > <td><input type="text" class="filter" data-column_num="3" placeholder="Search library" /></td> > <td><input type="text" class="filter" data-column_num="4" placeholder="Search callnumber" /></td> >+ [% FOR field IN additional_fields_for_subscription %] >+ <td><input type="text" class="filter" data-column_num="[% loop.count + 4 %]" placeholder="Search [% field.name %]" /></td> >+ [% END %] > <td></td> > <td></td> > </tr> >@@ -271,6 +277,13 @@ > <td> > [% IF ( subscription.callnumber ) %][% subscription.callnumber %][% END %] > </td> >+ [% FOR field IN additional_fields_for_subscription %] >+ [% IF field.authorised_value_category %] >+ <td>[% KohaAuthorisedValues.GetByCode( field.authorised_value_category, subscription.additional_fields.${field.name} ) %]</td> >+ [% ELSE %] >+ <td>[% subscription.additional_fields.${field.name} %]</td> >+ [% END %] >+ [% END %] > <td> > [% UNLESS subscription.cannotedit %] > <a href="/cgi-bin/koha/serials/serials-search.pl?subscriptionid=[% subscription.subscriptionid %]&op=reopen&routing=[% subscription.routing %]&searched=1&title_filter=[% title_filter %]&ISSN_filter=[% ISSN_filter %]&EAN_filter=[% EAN_filter %]&published_filter=[% publisher_filter %]&bookseller_filter=[% bookseller_filter %]&branch_filter=[% branch_filter %]" id="reopensub">Reopen</a> >@@ -346,9 +359,9 @@ > </li> > [% FOR field IN additional_fields_for_subscription %] > <li> >- <label for="additional_field_[% field.name %]"> [% field.name %]: </label> >+ <label for="additional_field_[% field.id %]ID"> [% field.name %]: </label> > [% IF field.authorised_value_choices %] >- <select id="additional_field_[% field.name %]" name="additional_field_[% field.name %]_filter"> >+ <select id="additional_field_[% field.id %]" name="additional_field_[% field.id %]_filter"> > <option value="">All</option> > [% FOREACH av IN field.authorised_value_choices %] > [% IF av.authorised_value == additional_field_filters.${field.name} %] >@@ -359,7 +372,7 @@ > [% END %] > </select> > [% ELSE %] >- <input id="additional_field_[% field.name %]" type="text" value="[% additional_field_filters.${field.name} %]" name="additional_field_[% field.name %]_filter" /> >+ <input id="additional_field_[% field.id %]" type="text" value="[% additional_field_filters.${field.name} %]" name="additional_field_[% field.id %]_filter" /> > [% END %] > </li> > [% END %] >diff --git a/serials/serials-search.pl b/serials/serials-search.pl >index 7685994..3c9b5da 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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10855
:
20937
|
20938
|
20939
|
20940
|
20941
|
20942
|
20943
|
20944
|
21184
|
21185
|
21186
|
21187
|
21188
|
21189
|
21190
|
21191
|
21663
|
22049
|
22050
|
22051
|
22052
|
22053
|
22054
|
22055
|
22056
|
22057
|
22359
|
22360
|
22600
|
22601
|
22602
|
22603
|
22604
|
22605
|
22606
|
22607
|
22608
|
22616
|
22698
|
22699
|
22700
|
22701
|
22702
|
22703
|
22722
|
22768
|
22769
|
22869
|
23052
|
23053
|
23142
|
23143
|
23301
|
23302
|
23594
|
23595
|
23596
|
23597
|
23598
|
23599
|
23600
|
23601
|
23602
|
23774
|
23775
|
23961
|
23962
|
23963
|
23964
|
24452
|
24453
|
24454
|
24455
|
24456
|
24457
|
24569
|
24570
|
26091
|
26092
|
26093
|
26094
|
26095
|
26096
|
26097
|
26254
|
26255
|
26256
|
26257
|
26258
|
26259
|
26260
|
26276
|
26651
|
26655
|
28929
|
28930
|
28931
|
28932
|
28933
|
28934
|
28935
|
28936
|
28937
|
28938
|
28939
|
28940
|
28941
|
29095
|
29161
|
35211
|
35212
|
35213
|
35214
|
35215
|
35216
|
35217
|
35218
|
35219
|
35220
|
35221
|
35309
|
35310
|
35369
|
35556
|
36359
|
36362
|
36363
|
36364
|
36365
|
36366
|
36367
|
36368
|
36369
|
36370
|
36371
|
36372
|
36373
|
36374
|
38549
|
38550
|
38551
|
38552
|
38553
|
38554
|
38555
|
38556
|
38557
|
38558
|
38559
|
38560
|
38561
|
42296
|
42297
|
42298
|
42299
|
42300
|
42301
|
42302
|
42303
|
42304
|
42305
|
42306
|
42307
|
42308
|
42309
|
42310
|
42332
|
42333
|
43076