Bug 20341: Show authorized value description for withdrawn like damaged and lost
Actually catalog detail page shows for damaged and lost items the authorized value description if exists.
We must do the same for withdrawn information.
Test plan :
1) Set for items a subfield linked to items.withdrawn and using the authorized value category 'WITHDRAWN'
2) Edit the authorized value category to add value '2' and description 'Eaten by dog'
3) Edit an item to set this withdrawn value
4) Go to staff interface and look at items in record detail page /cgi-bin/koh/catalogue/detail.pl :
=> Without patch you see 'Withdrawn' and with patch you see 'Eaten by dog'
5) Go to OPAc and look at items in record detail page /cgi-bin/koha/opac-detail.pl :
=> Without patch you see 'Withdrawn' and with patch you see 'Eaten by dog'
Signed-off-by: delaye <stephane.delaye@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 830ce35795)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
38d62cec1d
commit
12dd65fda9
|
|
@ -211,6 +211,10 @@ $mss = Koha::MarcSubfieldStructures->search({ frameworkcode => $fw, kohafield =>
|
|||
if ( $mss->count ) {
|
||||
$template->param( itemdamagedloop => GetAuthorisedValues( $mss->next->authorised_value ) );
|
||||
}
|
||||
$mss = Koha::MarcSubfieldStructures->search({ frameworkcode => $fw, kohafield => 'items.withdrawn', authorised_value => { not => undef } });
|
||||
if ( $mss->count ) {
|
||||
$template->param( itemwithdrawnloop => GetAuthorisedValues( $mss->next->authorised_value) );
|
||||
}
|
||||
|
||||
$mss = Koha::MarcSubfieldStructures->search({ frameworkcode => $fw, kohafield => 'items.materials', authorised_value => { not => undef } });
|
||||
my %materials_map;
|
||||
|
|
|
|||
|
|
@ -719,7 +719,15 @@ function verify_images() {
|
|||
[% END %]
|
||||
|
||||
[% IF ( item.withdrawn ) %]
|
||||
<span class="wdn">Withdrawn</span>
|
||||
[% IF itemwithdrawnloop %]
|
||||
[% FOREACH itemwithdrawnloo IN itemwithdrawnloop %]
|
||||
[% IF itemwithdrawnloo.authorised_value == item.withdrawn %]
|
||||
<span class="wdn">[% itemwithdrawnloo.lib %]</span>
|
||||
[% END %]
|
||||
[% END %]
|
||||
[% ELSE %]
|
||||
<span class="wdn">Withdrawn</span>
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
[% IF ( item.damaged ) %]
|
||||
|
|
|
|||
|
|
@ -46,7 +46,12 @@
|
|||
|
||||
[% IF ( item.withdrawn ) %]
|
||||
[% SET itemavailable = 0 %]
|
||||
<span class="item-status withdrawn">Item withdrawn</span>
|
||||
[% av_lib_include = AuthorisedValues.GetByCode( 'WITHDRAWN', item.withdrawn, 1 ) %]
|
||||
[% IF av_lib_include %]
|
||||
<span class="item-status withdrawn">[% av_lib_include %]</span>
|
||||
[% ELSE %]
|
||||
<span class="item-status withdrawn">Item withdrawn</span>
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
[% IF ( item.itemnotforloan ) %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue