From 9a15aa451442c3c0929ae0f81ad03f588eb2439e Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 10 Dec 2010 15:03:33 +0000 Subject: [PATCH] Fix for Bug 1883, authorised list of reasons why patron requesting book - Adding form controls to opac submission form and staf client edit form. - Adding display of patron reason for suggestion on opac list - Adding function for pulling an authorized value description using the category and value TODO: Add some default authorised values Signed-off-by: Colin Campbell Signed-off-by: Chris Cormack --- .../prog/en/modules/suggestion/suggestion.tmpl | 3 +++ koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tmpl | 3 +++ opac/opac-suggestions.pl | 7 ++++++- suggestion/suggestion.pl | 3 +++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tmpl index 89e89b51ab..2e6459f1b0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tmpl @@ -117,6 +117,9 @@ h4.collapse a { font-size : 80%; text-decoration: none; } fieldset.brief ol { di +
  • diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tmpl index ab5b753a29..483551b704 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tmpl @@ -91,6 +91,9 @@ $.tablesorter.addParser({ +
  • " /> Cancel
    diff --git a/opac/opac-suggestions.pl b/opac/opac-suggestions.pl index fc9ce5111f..75d07910db 100755 --- a/opac/opac-suggestions.pl +++ b/opac/opac-suggestions.pl @@ -115,17 +115,22 @@ foreach my $suggestion(@$suggestions_loop) { } 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, + patron_reason_loop => $patron_reason_loop, showall => $allsuggestions, "op_$op" => 1, suggestionsview => 1, ); - output_html_with_http_headers $input, $cookie, $template->output; diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl index f14c921cf1..26863f30e8 100755 --- a/suggestion/suggestion.pl +++ b/suggestion/suggestion.pl @@ -259,6 +259,9 @@ foreach my $support(@$supportlist){ } $template->param(itemtypeloop=>$supportlist); +my $patron_reason_loop = GetAuthorisedValues("OPAC_SUG",$$suggestion_ref{'patronreason'}); +$template->param(patron_reason_loop=>$patron_reason_loop); + #Budgets management my $searchbudgets={ budget_branchcode=>$branchfilter} if $branchfilter; my $budgets = GetBudgets($searchbudgets); -- 2.39.5