Bugzilla – Attachment 72817 Details for
Bug 19470
Add information about item being in rotating collection on detail page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19470: Add information about item being in rotating collection on detail page
Bug-19470-Add-information-about-item-being-in-rota.patch (text/plain), 4.65 KB, created by
Josef Moravec
on 2018-03-13 20:58:06 UTC
(
hide
)
Description:
Bug 19470: Add information about item being in rotating collection on detail page
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2018-03-13 20:58:06 UTC
Size:
4.65 KB
patch
obsolete
>From 58c1f7ef422b6ccb0e26cfd47a4154058b8c77ed Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Mon, 16 Oct 2017 07:51:09 +0000 >Subject: [PATCH] Bug 19470: Add information about item being in rotating > collection on detail page > >Test plan: >0) Apply the patch >1) Go to tools > rotating collections, create a collection and add some >items >2) Go through detail.pl and moredetail.pl (items detail) of added >items and confirm there is information about this collection and that >the link to collection does work >3) Go to detail pages of biblio without items in any collection and >confirm there is no regression > >Signed-off-by: Simon Pouchol <simon.pouchol@biblibre.com> >--- > catalogue/detail.pl | 9 ++++++++- > catalogue/moredetail.pl | 5 +++++ > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 4 ++++ > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt | 4 ++++ > 4 files changed, 21 insertions(+), 1 deletion(-) > >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index 58d4511..7c9c8d3 100755 >--- a/catalogue/detail.pl >+++ b/catalogue/detail.pl >@@ -270,7 +270,14 @@ foreach my $item (@items) { > $item->{CheckedOutFor} = $checkout->patron; > } > >- # Check the transit status >+ # checking for rotating collection >+ my $rotating_collection = $item_object->rotating_collection; >+ if ( $rotating_collection ) { >+ $item->{rotating_collection} = $rotating_collection; >+ $item->{IsInRotatingCollection} = 1; >+ } >+ >+ # Check the transit status > my ( $transfertwhen, $transfertfrom, $transfertto ) = GetTransfers($item->{itemnumber}); > if ( defined( $transfertwhen ) && ( $transfertwhen ne '' ) ) { > $item->{transfertwhen} = $transfertwhen; >diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl >index c82e653..dca9bcd 100755 >--- a/catalogue/moredetail.pl >+++ b/catalogue/moredetail.pl >@@ -133,6 +133,11 @@ foreach ( keys %{$data} ) { > foreach my $item (@items){ > $item->{object} = Koha::Items->find( $item->{itemnumber} ); > $item->{'collection'} = $ccodes->{ $item->{ccode} } if ($ccodes); >+ my $rotating_collection = $item->{object}->rotating_collection; >+ if ( $rotating_collection ) { >+ $item->{rotating_collection} = $rotating_collection; >+ $item->{IsInRotatingCollection} = 1; >+ } > $item->{'itype'} = $itemtypes->{ $item->{'itype'} }->{'translated_description'}; > $item->{'replacementprice'} = sprintf( "%.2f", $item->{'replacementprice'} ); > if ( defined $item->{'copynumber'} ) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index 3640a9c..2af016c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -447,6 +447,10 @@ > <span class="restricted">([% item.restricted %])</span> > [% END %] > >+ [% IF (item.IsInRotatingCollection) %] >+ <br />Item is part of rotating collection <a href="/cgi-bin/koha/rotating_collections/addItems.pl?colId=[% item.rotating_collection.colId %]"><span class="rotating_collection">[% item.rotating_collection.colTitle %]</span></a> >+ [% END %] >+ > </td> > <td class="datelastseen">[% item.datelastseen | $KohaDates %]</td> > <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?type=[% item.type %]&itemnumber=[% item.itemnumber %]&biblionumber=[% item.biblionumber %]&bi=[% item.biblioitemnumber %]#item[% item.itemnumber %]">[% item.barcode %]</a></td> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >index 3fb7856..fb2c65c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >@@ -189,6 +189,10 @@ > [% IF ITEM_DAT.withdrawn != "" && ITEM_DAT.withdrawn_on %] > <li><span class="label">Withdrawn on:</span>[% ITEM_DAT.withdrawn_on | $KohaDates %] </li> > [% END %] >+ >+ [% IF ITEM_DAT.IsInRotatingCollection %] >+ <li><span class="label">Rotating collection:</span><a href="/cgi-bin/koha/rotating_collections/addItems.pl?colId=[% ITEM_DAT.rotating_collection.colId %]">[% ITEM_DAT.rotating_collection.colTitle %]</a></li> >+ [% END %] > [% END %] > > </ol></div> >-- >2.1.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 19470
:
68173
|
68238
| 72817