Adding default hardcoded authorised values list + some comment on them
Even on an empty setup, the user will know which auth values he can filled Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
parent
6a924eb363
commit
066bb793f0
2 changed files with 34 additions and 0 deletions
|
@ -171,11 +171,24 @@ sub default_form {
|
|||
# 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,
|
||||
|
|
|
@ -111,6 +111,27 @@ the subfield is not entered through a free field, but though a list of authorize
|
|||
</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>
|
||||
|
|
Loading…
Reference in a new issue