From a453c166320be75df13061c7eed9bb527b4732fc Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 14 Sep 2007 15:24:14 -0500 Subject: [PATCH] Finishing cleanup of Admin templates: - Corrected markup generated by scripts. - Added standard or custom resident search form on all pages. - Add breadcrumb navigation to all pages Signed-off-by: Chris Cormack --- admin/auth_subfields_structure.pl | 6 +- admin/auth_tag_structure.pl | 6 +- admin/authorised_values.pl | 16 +- admin/categoryitem.pl | 199 ----------- admin/marc_subfields_structure.pl | 8 +- admin/marctagstructure.pl | 12 +- admin/roadtype.pl | 2 +- admin/thesaurus.pl | 267 -------------- .../prog/en/includes/cities-admin-menu.inc | 33 ++ .../prog/en/includes/roadtype-admin-menu.inc | 33 ++ .../prog/en/modules/admin/aqbookfund.tmpl | 115 +++--- .../prog/en/modules/admin/aqbudget.tmpl | 42 +-- .../admin/auth_subfields_structure.tmpl | 45 ++- .../en/modules/admin/auth_tag_structure.tmpl | 30 +- .../en/modules/admin/authorised_values.tmpl | 36 +- .../prog/en/modules/admin/authtypes.tmpl | 21 +- .../en/modules/admin/biblio_framework.tmpl | 9 +- .../prog/en/modules/admin/branches.tmpl | 1 + .../prog/en/modules/admin/categorie.tmpl | 1 + .../prog/en/modules/admin/categoryitem.tmpl | 327 ------------------ .../prog/en/modules/admin/charges.tmpl | 47 --- .../prog/en/modules/admin/checkmarc.tmpl | 7 +- .../prog/en/modules/admin/cities.tmpl | 50 ++- .../prog/en/modules/admin/finesrules.tmpl | 1 + .../prog/en/modules/admin/issuingrules.tmpl | 1 + .../prog/en/modules/admin/itemtypes.tmpl | 1 + .../prog/en/modules/admin/koha2marclinks.tmpl | 1 + .../admin/marc_subfields_structure.tmpl | 57 +-- .../en/modules/admin/marctagstructure.tmpl | 48 +-- .../prog/en/modules/admin/printers.tmpl | 1 + .../prog/en/modules/admin/roadtype.tmpl | 42 +-- .../en/modules/admin/systempreferences.tmpl | 1 + .../prog/en/modules/admin/thesaurus.tmpl | 171 --------- 33 files changed, 350 insertions(+), 1287 deletions(-) delete mode 100755 admin/categoryitem.pl delete mode 100755 admin/thesaurus.pl create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/cities-admin-menu.inc create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/roadtype-admin-menu.inc delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/admin/categoryitem.tmpl delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/admin/charges.tmpl delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/admin/thesaurus.tmpl diff --git a/admin/auth_subfields_structure.pl b/admin/auth_subfields_structure.pl index b1e8b63914..295c7ae261 100755 --- a/admin/auth_subfields_structure.pl +++ b/admin/auth_subfields_structure.pl @@ -189,7 +189,7 @@ if ($op eq 'add_form') { -size=>1, -multiple=>0, ); - $row_data{tagsubfield} =$data->{'tagsubfield'}."{'tagsubfield'}."\" id=\"tagsubfield\">"; + $row_data{tagsubfield} =$data->{'tagsubfield'}."{'tagsubfield'}."\" id=\"tagsubfield\" />"; $row_data{liblibrarian} = CGI::escapeHTML($data->{'liblibrarian'}); $row_data{libopac} = CGI::escapeHTML($data->{'libopac'}); $row_data{seealso} = CGI::escapeHTML($data->{'seealso'}); @@ -290,7 +290,7 @@ if ($op eq 'add_form') { -size=>1, -multiple=>0, ); - $row_data{tagsubfield} = "{'tagsubfield'}."\" size=\"1\" id=\"tagsubfield\" maxlength=\"1\">"; + $row_data{tagsubfield} = "{'tagsubfield'}."\" size=\"1\" id=\"tagsubfield\" maxlength=\"1\" />"; $row_data{liblibrarian} = ""; $row_data{libopac} = ""; $row_data{seealso} = ""; @@ -471,7 +471,7 @@ if ($op eq 'add_form') { $row_data{value_builder} = $results->[$i]{'value_builder'}; $row_data{hidden} = $results->[$i]{'hidden'} if($results->[$i]{'hidden'} gt "000") ; $row_data{isurl} = $results->[$i]{'isurl'}; - $row_data{delete} = "$script_name?op=delete_confirm&tagfield=$tagfield&tagsubfield=".$results->[$i]{'tagsubfield'}."&authtypecode=$authtypecode"; + $row_data{delete} = "$script_name?op=delete_confirm&tagfield=$tagfield&tagsubfield=".$results->[$i]{'tagsubfield'}."&authtypecode=$authtypecode"; $row_data{toggle} = $toggle; if ($row_data{tab} eq -1) { $row_data{subfield_ignored} = 1; diff --git a/admin/auth_tag_structure.pl b/admin/auth_tag_structure.pl index b7f5ba878a..7e96020b77 100755 --- a/admin/auth_tag_structure.pl +++ b/admin/auth_tag_structure.pl @@ -222,9 +222,9 @@ if ($op eq 'add_form') { $row_data{repeatable} = $results->[$i]{'repeatable'}; $row_data{mandatory} = $results->[$i]{'mandatory'}; $row_data{authorised_value} = $results->[$i]{'authorised_value'}; - $row_data{subfield_link} ="auth_subfields_structure.pl?tagfield=".$results->[$i]{'tagfield'}."&authtypecode=".$authtypecode; - $row_data{edit} = "$script_name?op=add_form&searchfield=".$results->[$i]{'tagfield'}."&authtypecode=".$authtypecode; - $row_data{delete} = "$script_name?op=delete_confirm&searchfield=".$results->[$i]{'tagfield'}."&authtypecode=".$authtypecode; + $row_data{subfield_link} ="auth_subfields_structure.pl?tagfield=".$results->[$i]{'tagfield'}."&authtypecode=".$authtypecode; + $row_data{edit} = "$script_name?op=add_form&searchfield=".$results->[$i]{'tagfield'}."&authtypecode=".$authtypecode; + $row_data{delete} = "$script_name?op=delete_confirm&searchfield=".$results->[$i]{'tagfield'}."&authtypecode=".$authtypecode; $row_data{toggle} = $toggle; push(@loop_data, \%row_data); } diff --git a/admin/authorised_values.pl b/admin/authorised_values.pl index 1c2f03e9b9..fe56aee015 100755 --- a/admin/authorised_values.pl +++ b/admin/authorised_values.pl @@ -100,9 +100,9 @@ if ($op eq 'add_form') { id => $data->{'id'} ); if ($data->{'category'}) { - $template->param(category => "$data->{'category'}"); + $template->param(category => "{'category'}'\" />$data->{'category'}"); } else { - $template->param(category => ""); + $template->param(category => ""); } ################## ADD_VALIDATE ################################## # called by add_form, used to insert/modify data in DB @@ -164,21 +164,21 @@ if ($op eq 'add_form') { $searchfield=$category_list[0]; } my ($count,$results)=StringSearch($searchfield,'web'); - my $toggle="white"; + my $toggle=1; my @loop_data = (); # builds value list for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){ - if ($toggle eq 'white'){ - $toggle="#ffffcc"; + if ($toggle eq 1){ + $toggle=1; } else { - $toggle="white"; + $toggle=0; } my %row_data; # get a fresh hash for the row data $row_data{category} = $results->[$i]{'category'}; $row_data{authorised_value} = $results->[$i]{'authorised_value'}; $row_data{lib} = $results->[$i]{'lib'}; - $row_data{edit} = "$script_name?op=add_form&id=".$results->[$i]{'id'}; - $row_data{delete} = "$script_name?op=delete_confirm&searchfield=$searchfield&id=".$results->[$i]{'id'}; + $row_data{edit} = "$script_name?op=add_form&id=".$results->[$i]{'id'}; + $row_data{delete} = "$script_name?op=delete_confirm&searchfield=$searchfield&id=".$results->[$i]{'id'}; push(@loop_data, \%row_data); } diff --git a/admin/categoryitem.pl b/admin/categoryitem.pl deleted file mode 100755 index e2a8b83c19..0000000000 --- a/admin/categoryitem.pl +++ /dev/null @@ -1,199 +0,0 @@ -#!/usr/bin/perl - -#script to administer the categories table -#written 20/02/2002 by paul.poulain@free.fr -# This software is placed under the gnu General Public License, v2 (http://www.gnu.org/licenses/gpl.html) - -# ALGO : -# this script use an $op to know what to do. -# if $op is empty or none of the above values, -# - the default screen is build (with all records, or filtered datas). -# - the user can clic on add, modify or delete record. -# if $op=add_form -# - if primkey exists, this is a modification,so we read the $primkey record -# - builds the add/modify form -# if $op=add_validate -# - the user has just send datas, so we create/modify the record -# if $op=delete_form -# - we show the record having primkey=$primkey and ask for deletion validation form -# if $op=delete_confirm -# - we delete the record having primkey=$primkey - - -# Copyright 2000-2002 Katipo Communications -# -# This file is part of Koha. -# -# Koha is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# -# Koha is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, -# Suite 330, Boston, MA 02111-1307 USA - -use strict; -use CGI; -use C4::Context; -use C4::Auth; -use C4::Output; - -sub StringSearch { - my ($searchstring,$type)=@_; - my $dbh = C4::Context->dbh; - $searchstring=~ s/\'/\\\'/g; - my @data=split(' ',$searchstring); - my $count=@data; - my $sth=$dbh->prepare("Select * from categories where (description like ?)"); - $sth->execute("$data[0]%"); - my @results; - while (my $data=$sth->fetchrow_hashref){ - push(@results,$data); - } - # $sth->execute; - $sth->finish; - return (scalar(@results),\@results); -} - -my $input = new CGI; -my $searchfield=$input->param('description'); -my $script_name="/cgi-bin/koha/admin/categorie.pl"; -my $categorycode=$input->param('categorycode'); -my $op = $input->param('op'); -$searchfield=~ s/\,//g; - -my ($template, $loggedinuser, $cookie) - = get_template_and_user({template_name => "admin/categoryitem.tmpl", - query => $input, - type => "intranet", - authnotrequired => 0, - debug => 1, - }); - - -$template->param(script_name => $script_name, - categorycode => $categorycode, - searchfield => $searchfield); - - -################## ADD_FORM ################################## -# called by default. Used to create form to add or modify a record -if ($op eq 'add_form') { - $template->param(add_form => 1); - #---- if primkey exists, it's a modify action, so read values to modify... - my $data; - if ($categorycode) { - my $dbh = C4::Context->dbh; - my $sth=$dbh->prepare("select categorycode,description,enrolmentperiod,upperagelimit,dateofbirthrequired,finetype,bulk,enrolmentfee,reservefee,overduenoticerequired from categories where categorycode=?"); - $sth->execute($categorycode); - $data=$sth->fetchrow_hashref; - $sth->finish; - } - - $template->param(description => $data->{'description'}, - enrolmentperiod => $data->{'enrolmentperiod'}, - upperagelimit => $data->{'upperagelimit'}, - dateofbirthrequired => $data->{'dateofbirthrequired'}, - finetype => $data->{'finetype'}, - bulk => $data->{'bulk'}, - enrolmentfee => $data->{'enrolmentfee'}, - overduenoticerequired => $data->{'overduenoticerequired'}, - reservefee => $data->{'reservefee'}); - - -; - # END $OP eq ADD_FORM -################## ADD_VALIDATE ################################## -# called by add_form, used to insert/modify data in DB -} elsif ($op eq 'add_validate') { - $template->param(add_validate => 1); - my $dbh = C4::Context->dbh; - my $sth=$dbh->prepare("replace categories (categorycode,description,enrolmentperiod,upperagelimit,dateofbirthrequired,finetype,bulk,enrolmentfee,reservefee,overduenoticerequired) values (?,?,?,?,?,?,?,?,?,?)"); - $sth->execute(map {$input->param($_)} ('categorycode','description','enrolmentperiod','upperagelimit','dateofbirthrequired','finetype','bulk','enrolmentfee','reservefee','overduenoticerequired')); - $sth->finish; - print "data recorded"; - print "
"; - print ""; - print "
"; - # END $OP eq ADD_VALIDATE -################## DELETE_CONFIRM ################################## -# called by default form, used to confirm deletion of data in DB -} elsif ($op eq 'delete_confirm') { - $template->param(delete_confirm => 1); - my $dbh = C4::Context->dbh; - my $sth=$dbh->prepare("select count(*) as total from categoryitem where categorycode=?"); - $sth->execute($categorycode); - my $total = $sth->fetchrow_hashref; - print "TOTAL : $categorycode : $total->{'total'}
"; - $sth->finish; - my $sth2=$dbh->prepare("select categorycode,description,enrolmentperiod,upperagelimit,dateofbirthrequired,finetype,bulk,enrolmentfee,reservefee,overduenoticerequired from categories where categorycode=?"); - $sth2->execute($categorycode); - my $data=$sth2->fetchrow_hashref; - $sth2->finish; - - $template->param(description => $data->{'description'}, - enrolmentperiod => $data->{'enrolmentperiod'}, - upperagelimit => $data->{'upperagelimit'}, - dateofbirthrequired => $data->{'dateofbirthrequired'}, - finetype => $data->{'finetype'}, - bulk => $data->{'bulk'}, - enrolmentfee => $data->{'enrolmentfee'}, - overduenoticerequired => $data->{'overduenoticerequired'}, - reservefee => $data->{'reservefee'}); - - # END $OP eq DELETE_CONFIRM -################## DELETE_CONFIRMED ################################## -# called by delete_confirm, used to effectively confirm deletion of data in DB -} elsif ($op eq 'delete_confirmed') { - $template->param(delete_confirmed => 1); - my $dbh = C4::Context->dbh; - my $categorycode=uc($input->param('categorycode')); - my $sth=$dbh->prepare("delete from categories where categorycode=?"); - $sth->execute($categorycode); - $sth->finish; - # END $OP eq DELETE_CONFIRMED -} else { # DEFAULT - $template->param(else => 1); - my @loop; - my ($count,$results)=StringSearch($searchfield,'web'); - my $toggle = 'white'; - for (my $i=0; $i < $count; $i++){ - my %row = (categorycode => $results->[$i]{'categorycode'}, - description => $results->[$i]{'description'}, - enrolmentperiod => $results->[$i]{'enrolmentperiod'}, - upperagelimit => $results->[$i]{'upperagelimit'}, - dateofbirthrequired => $results->[$i]{'dateofbirthrequired'}, - finetype => $results->[$i]{'finetype'}, - bulk => $results->[$i]{'bulk'}, - enrolmentfee => $results->[$i]{'enrolmentfee'}, - overduenoticerequired => $results->[$i]{'overduenoticerequired'}, - reservefee => $results->[$i]{'reservefee'}, - toggle => $toggle ); - push @loop, \%row; - if ( $toggle eq 'white' ) - { - $toggle = '#ffffcc'; - } - else - { - $toggle = 'white'; - } - - } - $template->param(loop => \@loop); - - -} #---- END $OP eq DEFAULT -$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"), - intranetstylesheet => C4::Context->preference("intranetstylesheet"), - IntranetNav => C4::Context->preference("IntranetNav"), - ); -output_html_with_http_headers $input, $cookie, $template->output; - - - diff --git a/admin/marc_subfields_structure.pl b/admin/marc_subfields_structure.pl index 8bdcfe6077..ae3d94b2ab 100755 --- a/admin/marc_subfields_structure.pl +++ b/admin/marc_subfields_structure.pl @@ -204,7 +204,7 @@ if ( $op eq 'add_form' ) { $data->{'tagsubfield'} . "{'tagsubfield'} - . "\" id=\"tagsubfield\">"; + . "\" id=\"tagsubfield\" />"; $row_data{subfieldcode} = $data->{'tagsubfield'}; $row_data{liblibrarian} = CGI::escapeHTML( $data->{'liblibrarian'} ); $row_data{libopac} = CGI::escapeHTML( $data->{'libopac'} ); @@ -309,7 +309,7 @@ if ( $op eq 'add_form' ) { $row_data{tagsubfield} = "{'tagsubfield'} - . "\" size=\"1\" id=\"tagsubfield\" maxlength=\"1\">"; + . "\" size=\"1\" id=\"tagsubfield\" maxlength=\"1\" />"; $row_data{liblibrarian} = ""; $row_data{libopac} = ""; $row_data{seealso} = ""; @@ -383,7 +383,7 @@ if ( $op eq 'add_form' ) { $template->param( action => "Edit subfields", tagfield => -"$tagfield", +"$tagfield", loop => \@loop_data, more_subfields => $more_subfields, more_tag => $tagfield @@ -540,7 +540,7 @@ else { # DEFAULT $row_data{delete} = "$script_name?op=delete_confirm&tagfield=$tagfield&tagsubfield=" . $results->[$i]{'tagsubfield'} - . "&frameworkcode=$frameworkcode"; + . "&frameworkcode=$frameworkcode"; $row_data{toggle} = $toggle; if ( $row_data{tab} eq -1 ) { diff --git a/admin/marctagstructure.pl b/admin/marctagstructure.pl index 99edb1cc6a..e65d92fedb 100755 --- a/admin/marctagstructure.pl +++ b/admin/marctagstructure.pl @@ -258,9 +258,9 @@ if ($op eq 'add_form') { $row_data{repeatable} = $results[$i]->{'mts_repeatable'}; $row_data{mandatory} = $results[$i]->{'mts_mandatory'}; $row_data{authorised_value} = $results[$i]->{'mts_authorised_value'}; - $row_data{subfield_link} ="marc_subfields_structure.pl?op=add_form&tagfield=".$results[$i]->{'mts_tagfield'}."&frameworkcode=".$frameworkcode; - $row_data{edit} = "$script_name?op=add_form&searchfield=".$results[$i]->{'mts_tagfield'}."&frameworkcode=".$frameworkcode; - $row_data{delete} = "$script_name?op=delete_confirm&searchfield=".$results[$i]->{'mts_tagfield'}."&frameworkcode=".$frameworkcode; + $row_data{subfield_link} ="marc_subfields_structure.pl?op=add_form&tagfield=".$results[$i]->{'mts_tagfield'}."&frameworkcode=".$frameworkcode; + $row_data{edit} = "$script_name?op=add_form&searchfield=".$results[$i]->{'mts_tagfield'}."&frameworkcode=".$frameworkcode; + $row_data{delete} = "$script_name?op=delete_confirm&searchfield=".$results[$i]->{'mts_tagfield'}."&frameworkcode=".$frameworkcode; $row_data{toggle} = $toggle; $j=$i; my @internal_loop = (); @@ -308,9 +308,9 @@ if ($op eq 'add_form') { $row_data{repeatable} = $results->[$i]{'repeatable'}; $row_data{mandatory} = $results->[$i]{'mandatory'}; $row_data{authorised_value} = $results->[$i]{'authorised_value'}; - $row_data{subfield_link} ="marc_subfields_structure.pl?tagfield=".$results->[$i]{'tagfield'}."&frameworkcode=".$frameworkcode; - $row_data{edit} = "$script_name?op=add_form&searchfield=".$results->[$i]{'tagfield'}."&frameworkcode=".$frameworkcode; - $row_data{delete} = "$script_name?op=delete_confirm&searchfield=".$results->[$i]{'tagfield'}."&frameworkcode=".$frameworkcode; + $row_data{subfield_link} ="marc_subfields_structure.pl?tagfield=".$results->[$i]{'tagfield'}."&frameworkcode=".$frameworkcode; + $row_data{edit} = "$script_name?op=add_form&searchfield=".$results->[$i]{'tagfield'}."&frameworkcode=".$frameworkcode; + $row_data{delete} = "$script_name?op=delete_confirm&searchfield=".$results->[$i]{'tagfield'}."&frameworkcode=".$frameworkcode; $row_data{toggle} = $toggle; push(@loop_data, \%row_data); } diff --git a/admin/roadtype.pl b/admin/roadtype.pl index 44c801570a..12d6e75c14 100755 --- a/admin/roadtype.pl +++ b/admin/roadtype.pl @@ -121,7 +121,7 @@ if ($op eq 'add_form') { } $template->param( - city_name => ( $data->{'road_type'}), + road_type => ( $data->{'road_type'}), ); diff --git a/admin/thesaurus.pl b/admin/thesaurus.pl deleted file mode 100755 index 4c54a0d7d4..0000000000 --- a/admin/thesaurus.pl +++ /dev/null @@ -1,267 +0,0 @@ -#!/usr/bin/perl - -# Copyright 2000-2002 Katipo Communications -# -# This file is part of Koha. -# -# Koha is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# -# Koha is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, -# Suite 330, Boston, MA 02111-1307 USA - -use strict; -use CGI; -use C4::Context; -use C4::Output; -use C4::Auth; -use C4::AuthoritiesMarc; - -my $input = new CGI; -my $search_category=$input->param('search_category'); -# $search_category=$input->param('category') unless $search_category; -#my $toponly = $input->param('toponly'); -my $branch = $input->param('branch'); -my $searchstring = $input->param('searchstring'); -# $searchstring=~ s/\,//g; -my $id = $input->param('id'); -my $offset=$input->param('offset'); -my $father=$input->param('father'); - -my $reqsel=""; -my $reqdel="delete from bibliothesaurus where id='$id'"; -my $script_name="/cgi-bin/koha/admin/thesaurus.pl"; -my $dbh = C4::Context->dbh; -my $authoritysep = C4::Context->preference("authoritysep"); - -my ($template, $borrowernumber, $cookie) - = get_template_and_user({template_name => "admin/thesaurus.tmpl", - query => $input, - type => "intranet", - authnotrequired => 0, - flagsrequired => {parameters => 1}, - debug => 1, - }); - -my $pagesize=20; - -my $prevpage = $offset-$pagesize; -my $nextpage =$offset+$pagesize; - -my $op = $input->param('op'); - -if ($op) { -$template->param(script_name => $script_name, - $op => 1); # we show only the TMPL_VAR names $op -} else { -$template->param(script_name => $script_name, - else => 1); # we show only the TMPL_VAR names $op -} -################## ADD_FORM ################################## -# called by default. Used to create form to add or modify a record -if ($op eq 'add_form') { - my $data; - if ($id) { - my $dbh = C4::Context->dbh; - my $sth=$dbh->prepare("select id,category,freelib,stdlib from bibliothesaurus where id=?"); - $sth->execute($id); - $data=$sth->fetchrow_hashref; - $sth->finish; - } else { - $data->{'category'} = $input->param('category'); - $data->{'stdlib'} = $input->param('stdlib'); - } - if ($search_category) { - $template->param(action => "Modify thesaurus"); - } else { - $template->param(action => "Add thesaurus"); - } - $template->param(category => $data->{'category'}, - stdlib => $data->{'stdlib'}, - freelib => $data->{'freelib'}, - id => $data->{'id'}, - branch => $branch, -# toponly => $toponly, - search_category => $search_category, - searchstring => $searchstring, - offset => $offset, - father => $father, - ); - if ($data->{'category'}) { - $template->param(category => "$data->{'category'}"); - } else { - $template->param(category => ""); - } -################## ADD_VALIDATE ################################## -# called by add_form, used to insert data in DB -} elsif ($op eq 'add_validate') { - my $dbh = C4::Context->dbh; - my $freelib = $input->param('freelib'); - $freelib = $input->param('stdlib') unless ($input->param('freelib')); - newauthority($dbh,$input->param('category'),$input->param('father')." ".$input->param('stdlib'), $freelib,'',1,''); - print "Content-Type: text/html\n\n"; - exit; -################## MOD_VALIDATE ################################## -# called by add_form, used to modify data in DB -} elsif ($op eq 'mod_validate') { - my $dbh = C4::Context->dbh; - my $freelib = $input->param('freelib'); - modauthority($dbh,$id,$freelib); - print "Content-Type: text/html\n\n"; - exit; -################## DELETE_CONFIRM ################################## -# called by default form, used to confirm deletion of data in DB -} elsif ($op eq 'delete_confirm') { - my $dbh = C4::Context->dbh; - my $sth=$dbh->prepare("select category,stdlib,freelib from bibliothesaurus where id=?"); - $sth->execute($id); - my $data=$sth->fetchrow_hashref; - $sth->finish; - $template->param(search_category => $search_category, - Tvalue => $data->{'stdlib'}, - id =>$id, - ); - - # END $OP eq DELETE_CONFIRM -################## DELETE_CONFIRMED ################################## -# called by delete_confirm, used to effectively confirm deletion of data in DB -} elsif ($op eq 'delete_confirmed') { - &delauthority($id); - print "Content-Type: text/html\n\n"; - exit; - # END $OP eq DELETE_CONFIRMED -################## DETAIL_FORM ################################## -} elsif ($op eq 'detail_form') { - # build categories list - my $sth = $dbh->prepare("select distinct category from bibliothesaurus"); - $sth->execute; - my @category_list; - while ( my ($category) = $sth->fetchrow_array) { - push(@category_list,$category); - } - my $tab_list = CGI::scrolling_list(-name=>'search_category', - -values=> \@category_list, - -default=>"$search_category", - -size=>1, - -tabindex=>'', - -multiple=>0, - ); - if (!$search_category) { - $search_category=$category_list[0]; - } - my $sth = $dbh->prepare("select father,stdlib,category,hierarchy from bibliothesaurus where id=?"); - $sth->execute($id); - my ($father,$stdlib,$category,$suphierarchy) = $sth->fetchrow_array; - $sth->finish; - $sth= $dbh->prepare("select id,freelib from bibliothesaurus where father=? and stdlib=?"); - $sth->execute($father,$stdlib); - my $toggle="white"; - # builds value list - my @loop_data; - while ( my ($id,$freelib) = $sth->fetchrow_array) { - if ($toggle eq 'white'){ - $toggle="#ffffcc"; - } else { - $toggle="white"; - } - my %row_data; # get a fresh hash for the row data - $row_data{freelib} = $freelib; - $row_data{edit} = "$script_name?op=add_form&id=$id"; - $row_data{delete} = "$script_name?op=delete_confirm&search_category=$search_category&id=$id"; - push(@loop_data, \%row_data); - } - - $template->param(loop => \@loop_data, - tab_list => $tab_list, - category => $search_category, -# toponly => $toponly, - searchstring => $searchstring, - stdlib => $stdlib, - category => $category); -################## DEFAULT ################################## -} else { # DEFAULT - # build categories list - my $sth = $dbh->prepare("select distinct category from bibliothesaurus"); - $sth->execute; - my @category_list; - while ( my ($category) = $sth->fetchrow_array) { - push(@category_list,$category); - } - my $tab_list = CGI::scrolling_list(-name=>'search_category', - -values=> \@category_list, - -default=>"$search_category", - -size=>1, - -tabindex=>'', - -multiple=>0, - ); - if (!$search_category) { - $search_category=$category_list[0]; - } - my ($count,$results)=searchauthority($search_category,$branch,$searchstring,$offset,$pagesize); - my $toggle="white"; - my @loop_data = (); - # builds value list - for (my $i=0; $i < $pagesize; $i++){ - if ($results->[$i]{'stdlib'}) { - if ($toggle eq 'white'){ - $toggle="#ffffcc"; - } else { - $toggle="white"; - } - my %row_data; # get a fresh hash for the row data - $row_data{category} = $results->[$i]{'category'}; -# $row_data{stdlib} = ("    " x $results->[$i]{'level'}).$results->[$i]{'stdlib'}; - $row_data{stdlib} = $results->[$i]{'stdlib'}; - $row_data{freelib} = $results->[$i]{'freelib'}; - $row_data{freelib} =~ s/($searchstring)/$1<\/b>/gi; - $row_data{father} = $results->[$i]{'father'}; - $row_data{dig} ="[$i]{'hierarchy'}$results->[$i]{'id'}|&search_category=$search_category>"; - $row_data{related} ="[$i]{'id'}&search_category=$search_category&op=detail_form>"; - $row_data{edit} = "$script_name?op=add_form&branch=$branch&search_category=$search_category&searchstring=$searchstring&offset=$offset&id=".$results->[$i]{'id'}; - $row_data{delete} = "$script_name?op=delete_confirm&search_category=$search_category&id=".$results->[$i]{'id'}; - push(@loop_data, \%row_data); - } - } - # rebuild complete hierarchy - my $sth = $dbh->prepare("select stdlib from bibliothesaurus where id=?"); - my @hierarchy = split(/\|/,$branch); - my @hierarchy_loop; - my $x; - my $father; - for (my $xi=0;$xi<=$#hierarchy;$xi++) { - my %link; - $sth->execute($hierarchy[$xi]); - my ($t) = $sth->fetchrow_array; - $x.=$hierarchy[$xi]."|"; - $link{'string'}=$t; - $link{'branch'}=$x; - push (@hierarchy_loop, \%link); - $father .= $t." $authoritysep "; - } - $template->param(loop => \@loop_data, - tab_list => $tab_list, - category => $search_category, -# toponly => $toponly, - searchstring => $searchstring, - hierarchy_loop => \@hierarchy_loop, - branch => $branch, - father => $father); - if ($offset>0) { - $template->param(previous => "$script_name?branch=$branch&search_category=$search_category&searchstring=$searchstring&offset=$prevpage"); - } - if ($pagesize<$count) { - $template->param(next => "$script_name?branch=$branch&search_category=$search_category&searchstring=$searchstring&offset=$nextpage"); - } -} #---- END $OP eq DEFAULT -$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"), - intranetstylesheet => C4::Context->preference("intranetstylesheet"), - IntranetNav => C4::Context->preference("IntranetNav"), - ); -output_html_with_http_headers $input, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cities-admin-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cities-admin-menu.inc new file mode 100644 index 0000000000..a0408c629c --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cities-admin-menu.inc @@ -0,0 +1,33 @@ + + + \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/roadtype-admin-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/roadtype-admin-menu.inc new file mode 100644 index 0000000000..3bea57f6c4 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/roadtype-admin-menu.inc @@ -0,0 +1,33 @@ + + + \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbookfund.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbookfund.tmpl index 33abf51cd9..4621603837 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbookfund.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbookfund.tmpl @@ -1,10 +1,67 @@ Koha › Administration › Funds and Budgets + + + - + @@ -105,62 +162,6 @@ - -
" name="Aform" method="post"> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudget.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudget.tmpl index 5f5b00c3f0..1827e99a20 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudget.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudget.tmpl @@ -1,15 +1,7 @@ -Koha › Administration › Budgets +Koha › Administration › <!-- TMPL_IF NAME="else" -->Budgets<!-- /TMPL_IF --><!-- TMPL_IF name="add_form" -->Budgets › <!-- TMPL_IF NAME="aqbudgetid" -->Modify<!-- TMPL_ELSE -->Add<!-- /TMPL_IF --> Budget<!-- /TMPL_IF --><!-- TMPL_IF NAME="add_validate" -->Budgets › Budget Data Recorded<!-- /TMPL_IF --><!-- TMPL_IF name="delete_confirmed" -->Budgets › Budget Deleted<!-- /TMPL_IF --><!-- TMPL_IF name="delete_confirm" -->Budgets › Delete Book Budget?<!-- /TMPL_IF --> - -/lib/calendar/calendar-system.css" /> - - - - + - - - - - - - - - -
- -
-
-
- - -

Modify category

- -

Add category

- - - " name="Aform" method="post"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Category code - " /> -
Category code - -
Description - " /> -   -
Enrolment period - " /> -
Upperage limit - " /> -
Age Required - " /> -
Fine type - " /> -
Bulk - " /> -
Enrolment fee - " /> -
Overdue notice required - " /> -
Issue limit - " /> -
Reserve fee - " /> -
  - -
- - - - Data recorded - " method="post"> - - - - - TOTAL : :
- - - - - - - " method="post"> - - " /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - data deleted - " method="post" /> - - - - - - -

Category admin

- - You Searched for - - - " method="post"> - " /> - - - -
- Category code - - -
Description
Enrolment period
Upperage limit
Age Required
Fine type
Bulk
Enrolment fee
Overdue notice required
Issue limit
Reserve fee
This record is used times. Deletion not possible
-
" method="post"> - -
-
CONFIRM DELETION
" method="post">
- - - - - - - - - - - - - - - - - "> - - - - - - - - - - - - - - - -
CategoryDescriptionEnrolmentUpper Age LimitAge RequiredFineBulkFeeOverdueIssue LimitReserve  
?op=add_form&categorycode=">Edit?op=delete_confirm&categorycode=">Delete
-

" method="post"> - -
-

- - - -
-
-
- -
-
- - - - - diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/charges.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/charges.tmpl deleted file mode 100644 index 630eccc458..0000000000 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/charges.tmpl +++ /dev/null @@ -1,47 +0,0 @@ - -Koha › Administration › Fines - - - - - - - -
- -
-
-
- -

Calculating Fines

-

Each box needs to be filled in with fine,time to start charging,charging cycle

-

eg 1,7,7 = $1 fine, after 7 days, every 7 days

-

Note : fines are calculated by the fines2.pl script, located in misc directory. Ask your administrator to put this script in crontab (after midnight) to have fines calculated every night

-
-
- - - - - - - - - - - -
 
- - "> - " value="" size="6" maxlength="10" /> -
- - - -
-
-
- -
-
- diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/checkmarc.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/checkmarc.tmpl index e77d001f13..27f526bbfc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/checkmarc.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/checkmarc.tmpl @@ -1,13 +1,14 @@ Koha › Administration › MARC Check -<!-- TMPL_IF name="total" --> › <!-- TMPL_VAR name="total" --> errors found<!-- TMPL_ELSE --> › Configuration OK!<!-- /TMPL_IF --> + : errors found : Configuration OK! + +: errors found : Configuration OK!
@@ -15,7 +16,7 @@
-

MARC Checking

+

MARC Bibliographic Framework Test

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tmpl index c0d9c7d473..3c6e3f9e5b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tmpl @@ -1,5 +1,5 @@ -Koha › Administration › Cities +Koha › Administration › <!-- TMPL_IF NAME="add_form" -->Cities › <!-- TMPL_IF NAME="cityid" --> Modify City<!-- TMPL_ELSE --> Add City<!-- /TMPL_IF --><!-- TMPL_ELSE --><!-- TMPL_IF NAME="delete_confirm" -->Cities › Confirm Deletion of City<!-- TMPL_ELSE --> Cities<!-- /TMPL_IF --><!-- /TMPL_IF -->
Test