[Koha-cvs] CVS: koha/admin aqbookfund.pl,1.16,1.17 authorised_values.pl,1.12,1.13 branches.pl,1.25,1.26 marctagstructure.pl,1.19,1.20
Ambrose C. LI
acli at users.sourceforge.net
Thu Mar 11 06:42:58 CET 2004
Update of /cvsroot/koha/koha/admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32518/admin
Modified Files:
aqbookfund.pl authorised_values.pl branches.pl
marctagstructure.pl
Log Message:
Make the page headings translatable while trying not to break old templates
Index: aqbookfund.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/aqbookfund.pl,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** aqbookfund.pl 12 Jan 2004 16:55:05 -0000 1.16
--- aqbookfund.pl 11 Mar 2004 05:42:55 -0000 1.17
***************
*** 84,91 ****
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
}
$template->param(action => $script_name);
--- 84,91 ----
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
}
$template->param(action => $script_name);
***************
*** 107,114 ****
if ($bookfundid) {
$header = "Modify book fund";
} else {
$header = "Add book fund";
}
! $template->param(header => $header);
my $add_or_modify=0;
if ($bookfundid) {
--- 107,117 ----
if ($bookfundid) {
$header = "Modify book fund";
+ $template->param('header-is-modify-p' => 1);
} else {
$header = "Add book fund";
+ $template->param('header-is-add-p' => 1);
}
! $template->param('use-header-flags-p' => 1);
! $template->param(header => $header); # NOTE deprecated
my $add_or_modify=0;
if ($bookfundid) {
Index: authorised_values.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/authorised_values.pl,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** authorised_values.pl 22 Dec 2003 19:16:58 -0000 1.12
--- authorised_values.pl 11 Mar 2004 05:42:56 -0000 1.13
***************
*** 88,96 ****
--- 88,100 ----
if ($searchfield) {
$template->param(action => "Modify authorised value");
+ $template->param('heading-modify-authorized-value-p' => 1);
} elsif ( ! $data->{'category'} ) {
$template->param(action => "Add new category");
+ $template->param('heading-add-new-category-p' => 1);
} else {
$template->param(action => "Add authorised value");
+ $template->param('heading-add-authorized-value-p' => 1);
}
+ $template->param('use-heading-flags-p' => 1);
$template->param(category => $data->{'category'},
authorised_value => $data->{'authorised_value'},
Index: branches.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/branches.pl,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** branches.pl 11 Feb 2004 08:40:10 -0000 1.25
--- branches.pl 11 Mar 2004 05:42:56 -0000 1.26
***************
*** 11,15 ****
# notify translators
# FIXME: need to implement the branch categories stuff
- # FIXME: heading() need to be moved to templates, need to notify translators
# FIXME: there are too many TMPL_IF's; the proper way to do it is to have
# separate templates for each individual action; need to notify
--- 11,14 ----
***************
*** 18,21 ****
--- 17,26 ----
# of these should be converted into exported booleans / counters etc
# so that the error messages can be localized; need to notify translators
+ #
+ # NOTE: heading() should now be called like this:
+ # 1. Use heading() as before
+ # 2. $template->param('heading-LISPISHIZED-HEADING-p' => 1);
+ # 3. $template->param('use-heading-flags-p' => 1);
+ # This ensures that both converted and unconverted templates work
# Finlay working on this file from 26-03-2002
***************
*** 82,85 ****
--- 87,92 ----
# If the user has pressed the "add new branch" button.
heading("Branches: Add Branch");
+ $template->param('heading-branches-add-branch-p' => 1);
+ $template->param('use-heading-flags-p' => 1);
editbranchform();
***************
*** 87,90 ****
--- 94,99 ----
# if the user has pressed the "edit branch settings" button.
heading("Branches: Edit Branch");
+ $template->param('heading-branches-edit-branch-p' => 1);
+ $template->param('use-heading-flags-p' => 1);
$template->param(add => 1);
editbranchform($branchcode);
***************
*** 115,120 ****
default("The branch with code $branchcode has been deleted.");
} elsif ($op eq 'editcategory') {
! # If the user has pressed the "add new category" button.
heading("Branches: Edit Category");
editcatform($categorycode);
} elsif ($op eq 'addcategory_validate') {
--- 124,131 ----
default("The branch with code $branchcode has been deleted.");
} elsif ($op eq 'editcategory') {
! # If the user has pressed the "add new category" or "modify" buttons.
heading("Branches: Edit Category");
+ $template->param('heading-branches-edit-category-p' => 1);
+ $template->param('use-heading-flags-p' => 1);
editcatform($categorycode);
} elsif ($op eq 'addcategory_validate') {
***************
*** 158,161 ****
--- 169,174 ----
my ($message) = @_;
heading("Branches");
+ $template->param('heading-branches-p' => 1);
+ $template->param('use-heading-flags-p' => 1);
$template->param(message => $message);
$template->param(action => $script_name);
Index: marctagstructure.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/marctagstructure.pl,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** marctagstructure.pl 12 Jan 2004 16:55:06 -0000 1.19
--- marctagstructure.pl 11 Mar 2004 05:42:56 -0000 1.20
***************
*** 102,109 ****
--- 102,112 ----
$template->param(action => "Modify tag",
searchfield => "<input type=\"hidden\" name=\"tagfield\" value=\"$searchfield\" />$searchfield");
+ $template->param('heading-modify-tag-p' => 1);
} else {
$template->param(action => "Add tag",
searchfield => "<input type=\"text\" name=\"tagfield\" size=\"5\" maxlength=\"3\" />");
+ $template->param('heading-add-tag-p' => 1);
}
+ $template->param('use-heading-flags-p' => 1);
$template->param(liblibrarian => $data->{'liblibrarian'},
libopac => $data->{'libopac'},
More information about the Koha-cvs
mailing list