# build categories list
my $sth = $dbh->prepare("select distinct category from authorised_values");
$sth->execute;
+ # the list
my @category_list;
+ # a hash, to check that some hardcoded categories exist.
+ my %categories;
while ( my ($category) = $sth->fetchrow_array) {
push(@category_list,$category);
+ $categories{$category} = 1;
}
# push koha system categories
+ push @category_list, 'Asort1' unless $categories{'Asort1'};
+ push @category_list, 'Asort2' unless $categories{'Asort2'};
+ push @category_list, 'Bsort1' unless $categories{'Bsort1'};
+ push @category_list, 'Bsort2' unless $categories{'Bsort2'};
+ push @category_list, 'SUGGEST' unless $categories{'SUGGEST'};
+ push @category_list, 'DAMAGED' unless $categories{'DAMAGED'};
+ push @category_list, 'LOST' unless $categories{'LOST'};
+ #reorder the list
+ @category_list = sort {$a cmp $b} @category_list;
my $tab_list = CGI::scrolling_list(-name=>'searchfield',
-id=>'searchfield',
-values=> \@category_list,
</div>
<!-- /TMPL_IF -->
<form action="/cgi-bin/koha/admin/authorised_values.pl" method="post"><label for="searchfield">Show Category: </label><!-- TMPL_VAR name="tab_list" --> <input type="submit" value="Submit" /></form>
+<!-- TMPL_IF EXPR="category eq 'Bsort1'" -->
+ <p>Bsort1 is an authorised value attached to patrons, that can be used for stats purposes</p>
+<!-- /TMPL_IF -->
+<!-- TMPL_IF EXPR="category eq 'Bsort2'" -->
+ <p>Bsort2 is an authorised value attached to patrons, that can be used for stats purposes</p>
+<!-- /TMPL_IF -->
+<!-- TMPL_IF EXPR="category eq 'Asort1'" -->
+ <p>Asort1 is an authorised value attached to acquisitions, that can be used for stats purposes</p>
+<!-- /TMPL_IF -->
+<!-- TMPL_IF EXPR="category eq 'Asort2'" -->
+ <p>Asort2 is an authorised value attached to acquisitions, that can be used for stats purposes</p>
+<!-- /TMPL_IF -->
+<!-- TMPL_IF EXPR="category eq 'SUGGEST'" -->
+ <p>The list of patron suggestion reject or accept reasons</p>
+<!-- /TMPL_IF -->
+<!-- TMPL_IF EXPR="category eq 'DAMAGED'" -->
+ <p>The list of status to describe a damaged item</p>
+<!-- /TMPL_IF -->
+<!-- TMPL_IF EXPR="category eq 'LOST'" -->
+ <p>The list of status to describe a lost item</p>
+<!-- /TMPL_IF -->
<table>
<tr>
<th>Category</th>