Fixing suggestions management page, Authorised values werent being passed through
authorChris Cormack <chrisc@catalyst.net.nz>
Fri, 11 Dec 2009 01:31:17 +0000 (14:31 +1300)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Sun, 20 Dec 2009 13:31:33 +0000 (14:31 +0100)
suggestion/suggestion.pl

index 8f69148..85b3eb5 100755 (executable)
@@ -157,6 +157,7 @@ if ($op=~/else/) {
     $displayby||="STATUS";
     my $criteria_list=GetDistinctValues("suggestions.".$displayby);
     my @allsuggestions;
+    my $reasonsloop = GetAuthorisedValues("SUGGEST");
     foreach my $criteriumvalue (map{$$_{'value'}} @$criteria_list){
         my $definedvalue = defined $$suggestion_ref{$displayby} && $$suggestion_ref{$displayby} ne "";
         
@@ -179,16 +180,17 @@ if ($op=~/else/) {
                             "suggestiontypelabel"=>GetCriteriumDesc($criteriumvalue,$displayby)||"",
                             "suggestionscount"=>scalar(@$suggestions),             
                             'suggestions_loop'=>$suggestions,
+                           'reasonsloop'     => $reasonsloop,
                             };
 
         delete $$suggestion_ref{$displayby} unless $definedvalue;
     }
-    my $reasonsloop = GetAuthorisedValues("SUGGEST");
+
     $template->param(
         "displayby"=> $displayby,
         "notabs"=> $displayby eq "",
         suggestions       => \@allsuggestions,
-        reasonsloop       => $reasonsloop,
+    
     );
 }