-- Choose -- [% FOREACH patron_reason_loo IN patron_reason_loop %]
[% IF ( patron_reason_loo.selected ) %][% patron_reason_loo.lib %] [% ELSE %][% patron_reason_loo.lib %] [% END %]
@@ -526,7 +519,7 @@ h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief o
[% IF ( suggestions_loo.copyrightdate ) %]© [% suggestions_loo.copyrightdate |html %] [% END %]
[% IF ( suggestions_loo.volumedesc ) %]; Volume:[% suggestions_loo.volumedesc |html %] [% END %]
- [% IF ( suggestions_loo.isbn ) %]; ISBN:[% suggestions_loo.isbn |html %] [% END %][% IF ( suggestions_loo.publishercode ) %]; Published by [% suggestions_loo.publishercode |html %] [% END %][% IF ( suggestions_loo.publicationyear ) %] in [% suggestions_loo.publicationyear |html %] [% END %][% IF ( suggestions_loo.place ) %] in [% suggestions_loo.place |html %] [% END %][% IF ( suggestions_loo.collectiontitle ) %]; [% suggestions_loo.collectiontitle |html %] [% END %][% IF ( suggestions_loo.itemtype ) %]; [% suggestions_loo.itemtype |html %] [% END %] [% IF ( suggestions_loo.note ) %][% suggestions_loo.note |html%] [% END %]
+ [% IF ( suggestions_loo.isbn ) %]; ISBN:[% suggestions_loo.isbn |html %] [% END %][% IF ( suggestions_loo.publishercode ) %]; Published by [% suggestions_loo.publishercode |html %] [% END %][% IF ( suggestions_loo.publicationyear ) %] in [% suggestions_loo.publicationyear |html %] [% END %][% IF ( suggestions_loo.place ) %] in [% suggestions_loo.place |html %] [% END %][% IF ( suggestions_loo.collectiontitle ) %]; [% suggestions_loo.collectiontitle |html %] [% END %][% IF ( suggestions_loo.itemtype ) %]; [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', suggestions_loo.itemtype, 0 ) %] [% END %] [% IF ( suggestions_loo.note ) %][% suggestions_loo.note |html%] [% END %]
[% IF ( suggestions_loo.emailsuggestedby ) %][% END %][% suggestions_loo.surnamesuggestedby %][% IF ( suggestions_loo.firstnamesuggestedby ) %], [% suggestions_loo.firstnamesuggestedby %][% END %] [% IF (suggestions_loo.cardnumbersuggestedby ) %]([% suggestions_loo.cardnumbersuggestedby %])[% END %] [% IF ( suggestions_loo.emailsuggestedby ) %] [% END %]
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt
@@ -43,18 +43,7 @@
Collection title:
Publication place:
Item type:
-
- Default
- [% FOREACH itemtypeloo IN itemtypeloop %]
- [% IF ( itemtypeloo.selected ) %]
-
- [% ELSE %]
-
- [% END %]
- [% itemtypeloo.description %]
-
- [% END %]
-
+ [% PROCESS 'av-build-dropbox.inc' name="itemtype", category="SUGGEST_FORMAT", size = 20 %]
[% IF ( branchloop ) %]
Library:
@@ -195,7 +184,7 @@
[% IF ( suggestions_loo.publishercode ) %] - [% suggestions_loo.publishercode |html %][% END %]
[% IF ( suggestions_loo.place ) %]([% suggestions_loo.place |html %])[% END %]
[% IF ( suggestions_loo.collectiontitle ) %] , [% suggestions_loo.collectiontitle |html %][% END %]
- [% IF ( suggestions_loo.itemtype ) %] - [% suggestions_loo.itemtype %][% END %]
+ [% IF ( suggestions_loo.itemtype ) %] - [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', suggestions_loo.itemtype, 1 ) %][% END %]
--- a/opac/opac-suggestions.pl
+++ a/opac/opac-suggestions.pl
@@ -148,15 +148,6 @@ if ( $op eq "delete_confirm" ) {
exit;
}
map{ $_->{'branchcodesuggestedby'}=GetBranchInfo($_->{'branchcodesuggestedby'})->[0]->{'branchname'}} @$suggestions_loop;
-my $supportlist=GetSupportList();
-foreach my $support(@$supportlist){
- if ($$support{'imageurl'}){
- $$support{'imageurl'}= getitemtypeimagelocation( 'opac', $$support{'imageurl'} );
- }
- else {
- delete $$support{'imageurl'}
- }
-}
foreach my $suggestion(@$suggestions_loop) {
if($suggestion->{'suggestedby'} == $borrowernumber) {
@@ -189,7 +180,6 @@ if ( C4::Context->preference("AllowPurchaseSuggestionBranchChoice") ) {
$template->param(
%$suggestion,
- itemtypeloop=> $supportlist,
suggestions_loop => $suggestions_loop,
patron_reason_loop => $patron_reason_loop,
"op_$op" => 1,
--- a/suggestion/suggestion.pl
+++ a/suggestion/suggestion.pl
@@ -54,14 +54,13 @@ sub Init{
sub GetCriteriumDesc{
my ($criteriumvalue,$displayby)=@_;
if ($displayby =~ /status/i) {
- if ( grep { /^($criteriumvalue)$/ } qw(ASKED ACCEPTED REJECTED CHECKED ORDERED AVAILABLE) ) {
- return ($criteriumvalue eq 'ASKED'?"Pending":ucfirst(lc( $criteriumvalue)));
- } else {
- return GetAuthorisedValueByCode('SUGGEST_STATUS', $criteriumvalue) || $criteriumvalue;
+ unless ( grep { /$criteriumvalue/ } qw(ASKED ACCEPTED REJECTED CHECKED ORDERED AVAILABLE) ) {
+ return GetAuthorisedValueByCode('SUGGEST_STATUS', $criteriumvalue ) || "Unknown";
}
+ return ($criteriumvalue eq 'ASKED'?"Pending":ucfirst(lc( $criteriumvalue))) if ($displayby =~/status/i);
}
return (GetBranchName($criteriumvalue)) if ($displayby =~/branchcode/);
- return (GetSupportName($criteriumvalue)) if ($displayby =~/itemtype/);
+ return GetAuthorisedValueByCode('SUGGEST_FORMAT', $criteriumvalue) || "Unknown" if ($displayby =~/itemtype/);
if ($displayby =~/suggestedby/||$displayby =~/managedby/||$displayby =~/acceptedby/){
my $borr=C4::Members::GetMember(borrowernumber=>$criteriumvalue);
return "" unless $borr;
@@ -324,20 +323,6 @@ $branchfilter=C4::Context->userenv->{'branch'} if ($onlymine && !$branchfilter);
$template->param( branchloop => \@branchloop,
branchfilter => $branchfilter);
-# the index parameter is different for item-level itemtypes
-my $supportlist = GetSupportList();
-
-foreach my $support (@$supportlist) {
- $$support{'selected'} = (defined $$suggestion_ref{'itemtype'})
- ? $$support{'itemtype'} eq $$suggestion_ref{'itemtype'}
- : 0;
- if ( $$support{'imageurl'} ) {
- $$support{'imageurl'} = getitemtypeimagelocation( 'intranet', $$support{'imageurl'} );
- } else {
- delete $$support{'imageurl'};
- }
-}
-$template->param(itemtypeloop=>$supportlist);
$template->param( returnsuggestedby => $returnsuggestedby );
my $patron_reason_loop = GetAuthorisedValues("OPAC_SUG",$$suggestion_ref{'patronreason'});
--