<h1>Suggestions management</h1>
-<label for="branchcode">Viewing suggestions for library:</label>
-<select name="branchcode" id="branchcode">
- <option value="__ANY__">Any</option>
- [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter || branchcode ) %]
-</select>
+[% IF ( displayby != "branchcode" ) %]
+ <label for="branchcode">Viewing suggestions for library:</label>
+ <select name="branchcode" id="branchcode">
+ <option value="__ANY__">Any</option>
+ [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter || branchcode ) %]
+ </select>
+[% END %]
[% FOR m IN messages %]
[% ELSIF (suggestion.suggestiontypelabel == "Available") %]Available
[% ELSIF (suggestion.suggestiontypelabel == "Ordered") %]Ordered
[% ELSIF (suggestion.suggestiontypelabel == "Unknown") %]Status unknown
+ [% ELSIF (suggestion.suggestiontypelabel == "__ANY__") %]Any
[% ELSE %][% suggestion.suggestiontypelabel | html %][% END %]
[% ELSE %]
[% IF ( suggestion.suggestiontype ) %]
}
return ($criteriumvalue eq 'ASKED'?"Pending":ucfirst(lc( $criteriumvalue))) if ($displayby =~/status/i);
}
- return Koha::Libraries->find($criteriumvalue)->branchname
- if $displayby =~ /branchcode/;
+ if ( $displayby =~ /branchcode/ ) {
+ return $criteriumvalue ? Koha::Libraries->find($criteriumvalue)->branchname : "__ANY__";
+ }
if ( $displayby =~ /itemtype/ ) {
my $av = Koha::AuthorisedValues->search({ category => 'SUGGEST_FORMAT', authorised_value => $criteriumvalue });
return $av->count ? $av->next->lib : 'Unknown';