@@ -, +, @@ --- .../bootstrap/en/modules/opac-suggestions.tt | 28 ++++++++++++---------- opac/opac-suggestions.pl | 9 ++++++- 2 files changed, 24 insertions(+), 13 deletions(-) --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt @@ -255,12 +255,11 @@ [% IF ( deleted ) %]
There are no pending purchase suggestions.
- [% ELSE %] -You have no pending purchase suggestions. View all suggestions
- [% END %] + [% IF title_filter %] +There are no pending purchase suggestions matching your search.
+ [% ELSIF loggedinusername AND NOT suggested_by_anyone %] +You have no pending purchase suggestions. View all suggestions
[% ELSE %]There are no pending purchase suggestions.
[% END %] [% ELSE %] [% IF ( loggedinusername ) %] -You have no pending purchase suggestions.
+ [% IF title_filter %] +There are no pending purchase suggestions matching your search.
+ [% ELSE %] +You have no pending purchase suggestions.
+ [% END %] [% ELSE %]You are not authorized to see pending purchase suggestions.
[% END %] --- a/opac/opac-suggestions.pl +++ a/opac/opac-suggestions.pl @@ -41,6 +41,7 @@ my $biblionumber = $input->param('biblionumber'); my $suggestion = $input->Vars; my $negcaptcha = $input->param('negcap'); my $suggested_by_anyone = $input->param('suggested_by_anyone') || 0; +my $title_filter = $input->param('title_filter'); my $need_confirm = 0; # If a spambot accidentally populates the 'negcap' field in the sugesstions form, then silently skip and return. @@ -188,7 +189,12 @@ if ( $op eq "add_confirm" ) { $op = 'else'; } -my $suggestions_loop = &SearchSuggestion({suggestedby => $suggestion->{suggestedby}}); +my $suggestions_loop = &SearchSuggestion( + { + suggestedby => $suggestion->{suggestedby}, + title => $title_filter, + } +); if ( $op eq "delete_confirm" ) { my @delete_field = $input->multi_param("delete_field"); foreach my $delete_field (@delete_field) { @@ -265,6 +271,7 @@ $template->param( messages => \@messages, suggestionsview => 1, suggested_by_anyone => $suggested_by_anyone, + title_filter => $title_filter, patrons_pending_suggestions_count => $patrons_pending_suggestions_count, need_confirm => $need_confirm, patrons_total_suggestions_count => $patrons_total_suggestions_count, --