Bugzilla – Attachment 83358 Details for
Bug 15774
Additional fields for baskets
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15774: Use the include file to display the subscription's additional fields
Bug-15774-Use-the-include-file-to-display-the-subs.patch (text/plain), 3.18 KB, created by
Nick Clemens (kidclamp)
on 2018-12-18 12:13:29 UTC
(
hide
)
Description:
Bug 15774: Use the include file to display the subscription's additional fields
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2018-12-18 12:13:29 UTC
Size:
3.18 KB
patch
obsolete
>From bd76ea6b50e9a6d0b6024e46f3cd2553d14220f9 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 1 Nov 2018 17:41:37 -0300 >Subject: [PATCH] Bug 15774: Use the include file to display the subscription's > additional fields > >We have it, why not to use it? > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > .../prog/en/modules/serials/subscription-detail.tt | 13 ++----------- > serials/subscription-detail.pl | 11 +++++++++-- > 2 files changed, 11 insertions(+), 13 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt >index 9f14fbbfb4..3ad88ff48b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt >@@ -125,23 +125,14 @@ > </div> > </div> > >- [% IF additional_fields_for_subscription %] >+ [% IF available_additional_fields %] > <hr> > <div class="row"> > <div class="col-sm-6"> > <h3>Additional fields:</h3> > <div class="rows"> > <ol> >- [% FOR field IN additional_fields_for_subscription %] >- <li> >- <span class="label">[% field.name | html %]:</span> >- [% IF field.authorised_value_category %] >- [% AuthorisedValues.GetByCode( field.authorised_value_category, additional_fields.${field.name} ) | html %] >- [% ELSE %] >- [% additional_fields.${field.name} | html %] >- [% END %] >- </li> >- [% END %] >+ [% INCLUDE 'additional-fields-display.inc' available=available_additional_fields values=additional_field_values %] > </ol> > </div> > </div> >diff --git a/serials/subscription-detail.pl b/serials/subscription-detail.pl >index 357a9ec080..6890fca54c 100755 >--- a/serials/subscription-detail.pl >+++ b/serials/subscription-detail.pl >@@ -30,6 +30,7 @@ use Koha::AdditionalFields; > use Koha::AuthorisedValues; > use Koha::DateUtils; > use Koha::Acquisition::Bookseller; >+use Koha::Subscriptions; > > use Date::Calc qw/Today Day_of_Year Week_of_Year Add_Delta_Days/; > use Carp; >@@ -121,8 +122,14 @@ my $numberpattern = C4::Serials::Numberpattern::GetSubscriptionNumberpattern($su > > my $default_bib_view = get_default_view(); > >-my $additional_fields = Koha::AdditionalFields->search( { tablename => 'subscription' } ); >-$template->param( additional_fields_for_subscription => $additional_fields ); >+my $subscription_object = Koha::Subscriptions->find( $subscriptionid ); >+$template->param( >+ available_additional_fields => [ Koha::AdditionalFields->search( { tablename => 'subscription' } ) ], >+ additional_field_values => { >+ map { $_->field->name => $_->value } >+ $subscription_object->additional_field_values->as_list >+ }, >+); > > # FIXME Do we want to hide canceled orders? > my $orders = Koha::Acquisition::Orders->search( { subscriptionid => $subscriptionid }, { order_by => [ { -desc => 'timestamp' }, \[ "field(orderstatus, 'ordered', 'partial', 'complete')" ] ] } ); >-- >2.11.0
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 15774
:
48224
|
53608
|
53609
|
72078
|
72079
|
72085
|
72086
|
75083
|
75084
|
75085
|
75086
|
75336
|
75354
|
75361
|
79976
|
79977
|
79978
|
79979
|
79980
|
79981
|
79982
|
80060
|
80061
|
80062
|
80063
|
80064
|
80065
|
80066
|
80680
|
81490
|
81491
|
81492
|
81493
|
81494
|
81495
|
81496
|
81497
|
81833
|
81837
|
81838
|
81839
|
81840
|
81841
|
81842
|
81843
|
81844
|
81845
|
81846
|
81847
|
81848
|
81849
|
81850
|
81851
|
81852
|
83349
|
83350
|
83351
|
83352
|
83353
|
83354
|
83355
|
83356
|
83357
|
83358
|
83359
|
83360
|
83361
|
83362
|
83363
|
83364
|
83444
|
83445
|
83446
|
83447
|
83448
|
83449
|
83450
|
83451
|
83452
|
83453
|
83454
|
83455
|
83456
|
83457
|
83458
|
83459
|
85333
|
85334
|
85335
|
85336
|
85337
|
85338
|
85339
|
85340
|
85341
|
85342
|
85343
|
85344
|
85345
|
85346
|
85347
|
85348
|
85792
|
85806
|
85807
|
85808
|
85809
|
85810
|
85811
|
85812
|
85813
|
85814
|
85815
|
85816
|
85817
|
85818
|
85819
|
85820
|
85821
|
85822
|
85823
|
85824
|
86411