use HTML::Template;
use C4::Context;
-
my %tabsysprefs;
$tabsysprefs{acquisitions}="Acquisitions";
$tabsysprefs{gist}="Acquisitions";
$tabsysprefs{authoritysep}="Authorities";
$tabsysprefs{ISBD}="Catalogue";
$tabsysprefs{marc}="Catalogue";
+$tabsysprefs{autoBarcode}="Catalogue";
$tabsysprefs{marcflavour}="Catalogue";
-$tabsysprefs{SubscriptionHistory}="Catalogue";
+$tabsysprefs{SubscriptionHistory}="OPAC";
$tabsysprefs{maxoutstanding}="Circulation";
$tabsysprefs{printcirculationslips}="Circulation";
-$tabsysprefs{suggestion}="Acquisitions";
+$tabsysprefs{ReturnBeforeExpiry}="Circulation";
+$tabsysprefs{suggestion}="OPAC";
$tabsysprefs{automembernum}="Members";
$tabsysprefs{noissuescharge}="Circulation";
$tabsysprefs{opacthemes}="OPAC";
$tabsysprefs{LibraryName}="OPAC";
$tabsysprefs{opacstylesheet}="OPAC";
$tabsysprefs{BiblioDefaultView}="OPAC";
-$tabsysprefs{hidelostitem}="OPAC";
+$tabsysprefs{opaclargeimage}="OPAC";
+$tabsysprefs{opacsmallimage}="OPAC";
+$tabsysprefs{hidelostitems}="OPAC";
$tabsysprefs{KohaAdmin}="Admin";
-$tabsysprefs{checkdigit}="Admin";
+$tabsysprefs{checkdigit}="Members";
$tabsysprefs{dateformat}="Admin";
$tabsysprefs{insecure}="Admin";
$tabsysprefs{ldapinfos}="Admin";
$tabsysprefs{itemcallnumber}="Catalogue";
$tabsysprefs{maxreserves}="Circulation";
$tabsysprefs{virtualshelves}="OPAC";
+$tabsysprefs{hide_marc}="Catalogue";
sub StringSearch {
my ($env,$searchstring,$type)=@_;
$sth->execute($syspref);
while (my $data=$sth->fetchrow_hashref){
push(@results,$data);
- $cnt ++;
+ $cnt++;
}
$sth->finish;
}
}
- }else {
+ } else {
my $strsth ="Select variable,value,explanation,type,options from systempreferences where variable not in (";
foreach my $syspref (keys %tabsysprefs){
$strsth .= $dbh->quote($syspref).",";
$sth->execute();
while (my $data=$sth->fetchrow_hashref){
push(@results,$data);
- $cnt ++;
+ $cnt++;
}
$sth->finish;
}
}
}
$sth->finish;
- print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=systempreferences.pl\"></html>";
+ print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=systempreferences.pl?tab=".$tabsysprefs{$input->param('variable')}."\"></html>";
exit;
################## DELETE_CONFIRM ##################################
# called by default form, used to confirm deletion of data in DB
#Adding tab management for system preferences
my $tab=$input->param('tab');
- if ($searchfield ne '') {
- $template->param(searchfield => "<p>You Searched for <strong>$searchfield</strong></p>");
- }
my $env;
my ($count,$results)=StringSearch($env,$searchfield,$tab);
my $toggle=0;
my @loop_data = ();
for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
- if ($toggle eq 0){
+ if ($toggle eq 0){
$toggle=1;
- } else {
+ } else {
$toggle=0;
- }
+ }
my %row_data; # get a fresh hash for the row data
$row_data{variable} = $results->[$i]{'variable'};
$row_data{value} = $results->[$i]{'value'};
$row_data{delete} = "$script_name?op=delete_confirm&searchfield=".$results->[$i]{'variable'};
push(@loop_data, \%row_data);
}
+ $tab=($tab?$tab:"Others");
$template->param(loop => \@loop_data, $tab => 1);
if ($offset>0) {
my $prevpage = $offset-$pagesize;