Bugzilla – Attachment 91631 Details for
Bug 22021
Item status not shown accurately on request.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22021: Improve item status display when placing holds in staff
Bug-22021-Improve-item-status-display-when-placing.patch (text/plain), 8.80 KB, created by
Nick Clemens (kidclamp)
on 2019-07-19 11:01:03 UTC
(
hide
)
Description:
Bug 22021: Improve item status display when placing holds in staff
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2019-07-19 11:01:03 UTC
Size:
8.80 KB
patch
obsolete
>From 7ed1db6f95f1a71025149250bafebf9c0ce55ca8 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Sat, 13 Jul 2019 14:23:19 +0200 >Subject: [PATCH] Bug 22021: Improve item status display when placing holds in > staff > >This patch is a bit of a clean-up to bring the item status display >more in line with the display on the detail page: > >- show descrpition of authorised value for not for loan instead of hardcoded text >- Show description of authorised value for lost instead of hardcoded text > This is also a translatability fix, as the text came from the .pl >- Show description of authorised value damaged instead of hardcoded text >- Make sequence of status match display on details page: > lost - damaged - not for loan > >To test: >- On a record with multiple items > - Add different status to the items > damaged, lost, not for loan > - Make sure you have items with one status and multiple status at the same time >- Look at how the status display on the detail page >- Place a hold, compare display >- Apply patch >- Repeat > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > .../prog/en/modules/reserve/request.tt | 71 +++++++++++----------- > reserve/request.pl | 12 ---- > 2 files changed, 36 insertions(+), 47 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >index f11f0cffff..5a96a1f3b5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -396,46 +396,47 @@ > </td> > [% END %] > <td> >- [% IF ( itemloo.onloan ) %] >- <span title="[% itemloo.date_due | html %]" class="checkedout">Due [% itemloo.date_due | $KohaDates as_due_date => 1 %]</span> >- [% ELSE %] >- <span title="0000-00-00"> >- [% IF ( itemloo.transfertwhen ) %] >- In transit from [% Branches.GetName( itemloo.transfertfrom ) | html %], >- to [% Branches.GetName( itemloo.transfertto ) | html %], since [% itemloo.transfertwhen | html %] >+ [% IF ( itemloo.onloan ) %] >+ <span title="[% itemloo.date_due | html %]" class="checkedout">Due [% itemloo.date_due | $KohaDates as_due_date => 1 %]</span> >+ [% ELSE %] >+ <span title="0000-00-00"> >+ [% IF ( itemloo.transfertwhen ) %] >+ In transit from [% Branches.GetName( itemloo.transfertfrom ) | html %], >+ to [% Branches.GetName( itemloo.transfertto ) | html %], since [% itemloo.transfertwhen | html %] >+ [% END %] >+ </span> > [% END %] >- </span> >- [% END %] >- [% IF ( itemloo.message ) %] >- Unavailable (lost or missing) >- [% END %] > >- [% IF ( itemloo.notforloan ) %] >- Not for loan ([% itemloo.notforloanvalue | html %]) >- [% END %] >+ [% IF ( itemloo.reservedate ) %] >+ [% IF ( itemloo.nocancel ) %] >+ Can't be cancelled when item is in transit >+ [% ELSE %] >+ [% IF ( itemloo.waitingdate ) %]Waiting[% ELSE %]On hold[% END %] >+ [% IF ( itemloo.canreservefromotherbranches ) %]for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% itemloo.ReservedFor.borrowernumber | uri %]">[% itemloo.ReservedFor.firstname | html %] [% itemloo.ReservedFor.surname | html %]</a>[% END %] [% IF ( itemloo.waitingdate ) %]at[% ELSE %]expected at[% END %] [% Branches.GetName( itemloo.ExpectedAtLibrary ) | html %] >+ since >+ [% IF ( itemloo.waitingdate ) %][% itemloo.waitingdate | $KohaDates %][% ELSE %][% IF ( itemloo.reservedate ) %][% itemloo.reservedate | html %][% END %][% END %]. <a class="info" href="modrequest.pl?CancelBiblioNumber=[% itemloo.biblionumber | html %]&CancelBorrowerNumber=[% itemloo.ReservedFor.borrowernumber | html %]&CancelItemnumber=[% itemloo.itemnumber | html %]" onclick="return confirmDelete(MSG_CONFIRM_DELETE_HOLD);">Cancel hold</a> >+ [% END %] >+ [% ELSE %] >+ Not on hold >+ [% END %] > >- [% IF ( itemloo.reservedate ) %] >- [% IF ( itemloo.nocancel ) %] >- Can't be cancelled when item is in transit >- [% ELSE %] >- [% IF ( itemloo.waitingdate ) %]Waiting[% ELSE %]On hold[% END %] >- [% IF ( itemloo.canreservefromotherbranches ) %]for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% itemloo.ReservedFor.borrowernumber | uri %]">[% itemloo.ReservedFor.firstname | html %] [% itemloo.ReservedFor.surname | html %]</a>[% END %] [% IF ( itemloo.waitingdate ) %]at[% ELSE %]expected at[% END %] [% Branches.GetName( itemloo.ExpectedAtLibrary ) | html %] >- since >- [% IF ( itemloo.waitingdate ) %][% itemloo.waitingdate | $KohaDates %][% ELSE %][% IF ( itemloo.reservedate ) %][% itemloo.reservedate | html %][% END %][% END %]. <a class="info" href="modrequest.pl?CancelBiblioNumber=[% itemloo.biblionumber | html %]&CancelBorrowerNumber=[% itemloo.ReservedFor.borrowernumber | html %]&CancelItemnumber=[% itemloo.itemnumber | html %]" onclick="return confirmDelete(MSG_CONFIRM_DELETE_HOLD);">Cancel hold</a> >+ [% IF itemloo.item_level_holds == "N" %] >+ <br/>Item level hold not allowed from OPAC >+ [% ELSIF itemloo.item_level_holds == "F" %] >+ <br/>Item level hold forced from OPAC >+ [% END %] > >- [% END %] >- [% ELSE %] >- Not on hold >- [% END %] >+ [% IF ( itemloo.itemlost ) %] >+ <span class="lost">[% AuthorisedValues.GetByCode( 'LOST', itemloo.itemlost ) | html %]</span> >+ [% END %] > >- [% IF itemloo.item_level_holds == "N" %] >- <br/>Item level hold not allowed from OPAC >- [% ELSIF itemloo.item_level_holds == "F" %] >- <br/>Item level hold forced from OPAC >- [% END %] >- [% IF ( itemloo.damaged ) %] >- <br />Damaged >- [% END %] >+ [% IF ( itemloo.damaged ) %] >+ <span class="dmg">[% AuthorisedValues.GetByCode( 'DAMAGED', itemloo.damaged ) | html %]</span> >+ [% END %] >+ >+ [% IF ( itemloo.notforloan ) %] >+ <span class="nfl">Not for loan ([% AuthorisedValues.GetByCode( 'NOT_LOAN', itemloo.notforloan ) | html %])</span> >+ [% END %] > </td> > </tr> > [% END %] <!--UNLESS item hide--> >diff --git a/reserve/request.pl b/reserve/request.pl >index c709cec7e5..89368086cc 100755 >--- a/reserve/request.pl >+++ b/reserve/request.pl >@@ -346,10 +346,6 @@ foreach my $biblionumber (@biblionumbers) { > } > }; > >- my $frameworkcode = GetFrameworkCode( $biblionumber ); >- my @notforloan_avs = Koha::AuthorisedValues->search_by_koha_field({ kohafield => 'items.notforloan', frameworkcode => $frameworkcode }); >- my $notforloan_label_of = { map { $_->authorised_value => $_->lib } @notforloan_avs }; >- > my @bibitemloop; > > my @available_itemtypes; >@@ -436,18 +432,10 @@ foreach my $biblionumber (@biblionumbers) { > # Management of the notforloan document > if ( $item->{notforloan} ) { > $item->{backgroundcolor} = 'other'; >- $item->{notforloanvalue} = >- $notforloan_label_of->{ $item->{notforloan} }; > } > > # Management of lost or long overdue items > if ( $item->{itemlost} ) { >- >- # FIXME localized strings should never be in Perl code >- $item->{message} = >- $item->{itemlost} == 1 ? "(lost)" >- : $item->{itemlost} == 2 ? "(long overdue)" >- : ""; > $item->{backgroundcolor} = 'other'; > if ($logged_in_patron->category->hidelostitems && !$showallitems) { > $item->{hide} = 1; >-- >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 22021
:
91519
|
91536
| 91631