This patch makes the page title and breadcrumbs more consistent.
It does so by removing some text (Manage...) and using Edit (id) and Create
on building both the breadcrumbs and titles.
To test:
- Traverse all the Label creator options
=> FAIL: the texts are not consistent and don't match what we use in the patron card creator.
- Apply the patch
=> SUCCESS: Terminology is consistent, titles and breadcrumbs show the same information
- Sign off :-D
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
[% USE ItemTypes %]
[% INCLUDE 'doc-head-open.inc' %]
- <title>Koha › Tools › Label creator › Manage label batches</title>
+ <title>Koha › Tools › Label creator › Batches › [% IF batch_id %]Edit ([% batch_id %])[% ELSE %]Create[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
[% INCLUDE 'greybox.inc' %]
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
<a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> ›
<a href="/cgi-bin/koha/labels/label-home.pl">Label creator</a> ›
- <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=batch">Manage label batches</a> ›
+ <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=batch">Batches</a> ›
[% IF batch_id %]
- Manage batch number [% batch_id %]
+ Edit ([% batch_id %])
[% ELSE %]
- Create new batch
+ Create
[% END %]
</div>
<div id="doc3" class="yui-t2">
[% END %]
[% END %]
[% INCLUDE 'doc-head-open.inc' %]
- <title>Koha › Tools › Label creator › Manage label layouts</title>
+ <title>Koha › Tools › Label creator › Layouts › [% IF ( layout_id ) %]Edit ([% layout_id %])[% ELSE %]Create[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
<script type="text/JavaScript" language="JavaScript">
//<![CDATA[
<a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> ›
<a href="/cgi-bin/koha/labels/label-home.pl">Label creator</a> ›
- <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=layout">Manage label layouts</a> ›
- [% IF ( layout_id ) %]Edit[% ELSE %]Create[% END %] Label layout
+ <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=layout">Layouts</a> ›
+ [% IF ( layout_id ) %]Edit ([% layout_id %])[% ELSE %]Create[% END %]
</div>
<div id="doc3" class="yui-t2">
<div id="bd">
</div>
<form name="input" action="/cgi-bin/koha/labels/label-edit-layout.pl" method="get">
<fieldset class="rows">
- <legend>[% IF ( layout_id ) %]Edit[% ELSE %]Create[% END %] Label layout</legend>
+ <legend>[% IF ( layout_id ) %]Edit[% ELSE %]Create[% END %] label layout</legend>
<ol>
<li>
<label for="layout_name">Layout name: </label>
[% INCLUDE 'doc-head-open.inc' %]
- <title>Koha › Tools › Label creator › Printer profiles</title>
+ <title>Koha › Tools › Label creator › Profiles › [% IF ( profile_id ) %]Edit ([% profile_id %])[% ELSE %]Create[% END%]</title>
[% INCLUDE 'doc-head-close.inc' %]
<script type="text/javascript">
//<![CDATA[
<a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> ›
<a href="/cgi-bin/koha/labels/label-home.pl">Label creator</a> ›
- <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=profile">Printer profiles</a> ›
- Edit printer profile
+ <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=profile">Profiles</a> ›
+ [% IF ( profile_id ) %]Edit ([% profile_id %])[% ELSE %]Create[% END%]
</div>
<div id="doc3" class="yui-t2">
<div id="bd">
[% INCLUDE 'doc-head-open.inc' %]
- <title>Koha › Tools › Label creator › Label templates</title>
+ <title>Koha › Tools › Label creator › Templates › [% IF ( template_id ) %]Edit ([% template_id %])[% ELSE %]Create[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
<script type="text/javascript">
//<![CDATA[
<a href="/cgi-bin/koha/mainpage.pl">Home</a>›
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>›
<a href="/cgi-bin/koha/labels/label-home.pl">Label creator</a>›
- <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=template">Label templates</a>›
- Edit label template
+ <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=template">Templates</a>›
+ [% IF ( template_id ) %]Edit ([% template_id %])[% ELSE %]Create[% END %]
</div>
<div id="doc3" class="yui-t2">
<div id="bd">
+[% BLOCK translate_label_element %]
+[%- SWITCH element -%]
+[%- CASE 'layout' -%]layout
+[%- CASE 'Layouts' -%]Layouts
+[%- CASE 'template' -%]template
+[%- CASE 'Templates' -%]Templates
+[%- CASE 'profile' -%]profile
+[%- CASE 'Profiles' -%]Profiles
+[%- CASE 'batch' -%]batch
+[%- CASE 'Batches' -%]Batches
+[%- END -%]
+[% END %]
[% INCLUDE 'doc-head-open.inc' %]
- <title>Koha › Tools › Label creator › Manage label</title>
+ <title>Koha › Tools › Label creator › [% PROCESS translate_label_element element=label_element_title %]</title>
[% INCLUDE 'doc-head-close.inc' %]
[% INCLUDE 'greybox.inc' %]
<script type="text/javascript">
<a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> ›
<a href="/cgi-bin/koha/labels/label-home.pl">Label creator</a> ›
- Manage label [% label_element_title %]
+ [% PROCESS translate_label_element element=label_element_title %]
</div>
<div id="doc3" class="yui-t2">
<div id="bd">
[%- CASE 'Actions' -%]Actions
[%- END -%]
[% END %]
+
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Tools › Patron card creator › [% PROCESS translate_card_element element=card_element_title %]</title>
[% INCLUDE 'doc-head-close.inc' %]
# You should have received a copy of the GNU General Public License
# along with Koha; if not, see <http://www.gnu.org/licenses>.
-use strict;
-use warnings;
+use Modern::Perl;
+
use vars qw($debug);
use CGI qw ( -utf8 );
$template->param(error => $error) if ($error) && ($error ne 0);
$template->param(print => 1) if ($label_element eq 'batch');
$template->param(
- op => $op,
- element_id => $element_id,
- table_loop => $table,
- label_element => $label_element,
+ op => $op,
+ element_id => $element_id,
+ table_loop => $table,
+ label_element => $label_element,
+ label_element_title => (
+ $label_element eq 'layout' ? 'Layouts' :
+ $label_element eq 'template' ? 'Templates' :
+ $label_element eq 'profile' ? 'Profiles' :
+ $label_element eq 'batch' ? 'Batches' :
+ '' )
);
output_html_with_http_headers $cgi, $cookie, $template->output;