[Koha-patches] [PATCH 3/6] BG5575, comment 5
paul.poulain at biblibre.com
paul.poulain at biblibre.com
Wed Jan 19 21:05:33 CET 2011
From: Paul Poulain <paul.poulain at biblibre.com>
On moremember.pl under the "Suggestions" tab, authorized values for
reasonACCEPTED are not appearing.
=> the list was removed because it was a copy/paste from suggestions/suggestion.pl
and this script also has some filters option that does not exist here, as we look
only at one patron.
removing unneeded lines (as well as somme commented ones & one indenting mistake)
---
.../prog/en/modules/members/moremember.tmpl | 3 ++-
members/moremember.pl | 11 +----------
2 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl
index 9f87ecd..14d330f 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl
@@ -520,7 +520,7 @@ $(document).ready(function() {
<!-- TMPL_IF name="ASKED" -->Asked<!-- /TMPL_IF --> <!-- TMPL_IF name="ACCEPTED" -->Accepted<!-- /TMPL_IF --> <!-- TMPL_IF name="ORDERED" -->Ordered<!-- /TMPL_IF --> <!-- TMPL_IF name="REJECTED" -->Rejected<!-- /TMPL_IF --> <!-- TMPL_IF name="CHECKED" -->Checked<!-- /TMPL_IF --> <!-- TMPL_IF name="reason" --><br />(<!-- TMPL_VAR name="reason" -->)<!-- /TMPL_IF -->
</td>
</tr>
- <!-- /TMPL_LOOP --><!-- /TMPL_LOOP -->
+ <!-- /TMPL_LOOP -->
</tbody>
</table>
@@ -553,6 +553,7 @@ $(document).ready(function() {
<fieldset class="action">
<input type="submit" value="Submit" /></fieldset>
</form>
+<!-- /TMPL_LOOP -->
<!-- TMPL_ELSE -->Patron has no suggestions.<!-- /TMPL_IF -->
</div>
<!-- ###################### suggestions end ######################-->
diff --git a/members/moremember.pl b/members/moremember.pl
index ae5da1a..ec3c26c 100755
--- a/members/moremember.pl
+++ b/members/moremember.pl
@@ -471,14 +471,6 @@ sub GetCriteriumDesc {
my $countsuggestions=0;
my $reasonsloop = GetAuthorisedValues("SUGGEST");
foreach my $criteriumvalue ( map { $$_{'value'} } @$criteria_list ) {
- my $definedvalue = defined $$suggestion_ref{$displayby} && $$suggestion_ref{$displayby} ne "";
-
- next if ( $definedvalue && $$suggestion_ref{$displayby} ne $criteriumvalue );
- $$suggestion_ref{$displayby} = $criteriumvalue;
-
- # warn $$suggestion_ref{$displayby}."=$criteriumvalue; $displayby";
- #warn "===========================================";
- #warn Data::Dumper::Dumper($suggestion_ref);
my $suggestions = &SearchSuggestion($suggestion_ref);
foreach my $suggestion (@$suggestions) {
$suggestion->{budget_name} = GetBudget( $suggestion->{budgetid} )->{budget_name} if $suggestion->{budgetid};
@@ -491,14 +483,13 @@ sub GetCriteriumDesc {
}
$countsuggestions++;
}
-push @allsuggestions,
+ push @allsuggestions,
{ "suggestiontype" => $criteriumvalue || "suggest",
"suggestiontypelabel" => GetCriteriumDesc( $criteriumvalue, $displayby ) || "",
"suggestionscount" => scalar(@$suggestions),
'suggestions_loop' => $suggestions,
'reasonsloop' => $reasonsloop,
};
- delete $$suggestion_ref{$displayby} unless $definedvalue;
}
if($countsuggestions>0)
{
--
1.7.1
More information about the Koha-patches
mailing list