diff --git a/admin/aqbookfund.pl b/admin/aqbookfund.pl index 29e626b37a..3c099d6870 100755 --- a/admin/aqbookfund.pl +++ b/admin/aqbookfund.pl @@ -83,10 +83,10 @@ my ($template, $borrowernumber, $cookie) if ($op) { $template->param(script_name => $script_name, - $op => 1); # we show only the TMPL_VAR names $op + $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 + else => 1); # we show only the TMPL_VAR names $op } $template->param(action => $script_name); @@ -106,10 +106,13 @@ if ($op eq 'add_form') { } 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(header => $header); + $template->param('use-header-flags-p' => 1); + $template->param(header => $header); # NOTE deprecated my $add_or_modify=0; if ($bookfundid) { $add_or_modify=1; diff --git a/admin/authorised_values.pl b/admin/authorised_values.pl index cd735a8423..9faa93094d 100755 --- a/admin/authorised_values.pl +++ b/admin/authorised_values.pl @@ -87,11 +87,15 @@ if ($op eq 'add_form') { } 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'}, lib => $data->{'lib'}, diff --git a/admin/branches.pl b/admin/branches.pl index 808f19a84a..b2cde60922 100755 --- a/admin/branches.pl +++ b/admin/branches.pl @@ -10,13 +10,18 @@ # TMPL_LOOP'ized; doing this properly will fix bug 130; need to # 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 # translators # FIXME: there are lots of error messages exported to the template; a lot # 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 # Reorganising this branches admin page..... @@ -81,11 +86,15 @@ $template->param(action => $script_name); if ($op eq 'add') { # 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(); } elsif ($op eq 'edit') { # 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); } elsif ($op eq 'add_validate') { @@ -114,8 +123,10 @@ if ($op eq 'add') { $template->param(else => 1); default("The branch with code $branchcode has been deleted."); } elsif ($op eq 'editcategory') { - # If the user has pressed the "add new category" button. + # 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') { # confirm settings change... @@ -157,6 +168,8 @@ if ($op eq 'add') { sub default { 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); branchinfotable(); diff --git a/admin/marctagstructure.pl b/admin/marctagstructure.pl index 2564e85e4b..53558fda5f 100755 --- a/admin/marctagstructure.pl +++ b/admin/marctagstructure.pl @@ -101,10 +101,13 @@ if ($op eq 'add_form') { if ($searchfield) { $template->param(action => "Modify tag", searchfield => "$searchfield"); + $template->param('heading-modify-tag-p' => 1); } else { $template->param(action => "Add tag", searchfield => ""); + $template->param('heading-add-tag-p' => 1); } + $template->param('use-heading-flags-p' => 1); $template->param(liblibrarian => $data->{'liblibrarian'}, libopac => $data->{'libopac'}, repeatable => CGI::checkbox('repeatable',$data->{'repeatable'}?'checked':'',1,''), diff --git a/koha-tmpl/intranet-tmpl/default/en/parameters/aqbookfund.tmpl b/koha-tmpl/intranet-tmpl/default/en/parameters/aqbookfund.tmpl index ee328d22c2..09c2ac173c 100644 --- a/koha-tmpl/intranet-tmpl/default/en/parameters/aqbookfund.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/parameters/aqbookfund.tmpl @@ -101,7 +101,14 @@ } } -
+