projects
/
koha_gimpoz
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug 1997: new OPACNoResultsFound pref
[koha_gimpoz]
/
opac
/
opac-suggestions.pl
diff --git
a/opac/opac-suggestions.pl
b/opac/opac-suggestions.pl
index
f22d06e
..
75d0791
100755
(executable)
--- a/
opac/opac-suggestions.pl
+++ b/
opac/opac-suggestions.pl
@@
-35,7
+35,8
@@
delete $$suggestion{$_} foreach qw<op suggestedbyme>;
$op = 'else' unless $op;
my ( $template, $borrowernumber, $cookie );
$op = 'else' unless $op;
my ( $template, $borrowernumber, $cookie );
-
+my $deleted = $input->param('deleted');
+my $submitted = $input->param('submitted');
if ( C4::Context->preference("AnonSuggestions") ) {
( $template, $borrowernumber, $cookie ) = get_template_and_user(
if ( C4::Context->preference("AnonSuggestions") ) {
( $template, $borrowernumber, $cookie ) = get_template_and_user(
@@
-67,7
+68,7
@@
else {
$$suggestion{suggestedby} ||= $borrowernumber unless ($allsuggestions);
}
# warn "bornum:",$borrowernumber;
$$suggestion{suggestedby} ||= $borrowernumber unless ($allsuggestions);
}
# warn "bornum:",$borrowernumber;
-use YAML;
+
my $suggestions_loop =
&SearchSuggestion( $suggestion);
if ( $op eq "add_confirm" ) {
my $suggestions_loop =
&SearchSuggestion( $suggestion);
if ( $op eq "add_confirm" ) {
@@
-84,6
+85,8
@@
if ( $op eq "add_confirm" ) {
&SearchSuggestion( $suggestion );
}
$op = 'else';
&SearchSuggestion( $suggestion );
}
$op = 'else';
+ print $input->redirect("/cgi-bin/koha/opac-suggestions.pl?op=else&submitted=1");
+ exit;
}
if ( $op eq "delete_confirm" ) {
}
if ( $op eq "delete_confirm" ) {
@@
-92,6
+95,8
@@
if ( $op eq "delete_confirm" ) {
&DelSuggestion( $borrowernumber, $delete_field );
}
$op = 'else';
&DelSuggestion( $borrowernumber, $delete_field );
}
$op = 'else';
+ print $input->redirect("/cgi-bin/koha/opac-suggestions.pl?op=else&deleted=1");
+ exit;
}
map{ $_->{'branchcodesuggestedby'}=GetBranchInfo($_->{'branchcodesuggestedby'})->[0]->{'branchname'}} @$suggestions_loop;
my $supportlist=GetSupportList();
}
map{ $_->{'branchcodesuggestedby'}=GetBranchInfo($_->{'branchcodesuggestedby'})->[0]->{'branchname'}} @$suggestions_loop;
my $supportlist=GetSupportList();
@@
-110,17
+115,22
@@
foreach my $suggestion(@$suggestions_loop) {
} else {
$suggestion->{'showcheckbox'} = 0;
}
} else {
$suggestion->{'showcheckbox'} = 0;
}
+ if($suggestion->{'patronreason'}){
+ $suggestion->{'patronreason'} = GetKohaAuthorisedValueLib("OPAC_SUG",$suggestion->{'patronreason'},1);
+ }
}
}
+my $patron_reason_loop = GetAuthorisedValues("OPAC_SUG");
+
$template->param(
%$suggestion,
itemtypeloop=> $supportlist,
suggestions_loop => $suggestions_loop,
$template->param(
%$suggestion,
itemtypeloop=> $supportlist,
suggestions_loop => $suggestions_loop,
+ patron_reason_loop => $patron_reason_loop,
showall => $allsuggestions,
"op_$op" => 1,
showall => $allsuggestions,
"op_$op" => 1,
- suggestionsview => 1
+ suggestionsview => 1,
);
);
-
output_html_with_http_headers $input, $cookie, $template->output;
output_html_with_http_headers $input, $cookie, $template->output;