Bug 15072: Breadcrumbs and titles inconsistent in Label creator

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>
This commit is contained in:
Tomas Cohen Arazi 2015-10-27 15:15:16 -03:00
parent 9b9b966cb1
commit 0d8de48bf5
7 changed files with 41 additions and 22 deletions

View File

@ -1,6 +1,6 @@
[% USE ItemTypes %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Tools &rsaquo; Label creator &rsaquo; Manage label batches</title>
<title>Koha &rsaquo; Tools &rsaquo; Label creator &rsaquo; Batches &rsaquo; [% 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" />
@ -160,11 +160,11 @@
<a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo;
<a href="/cgi-bin/koha/labels/label-home.pl">Label creator</a> &rsaquo;
<a href="/cgi-bin/koha/labels/label-manage.pl?label_element=batch">Manage label batches</a> &rsaquo;
<a href="/cgi-bin/koha/labels/label-manage.pl?label_element=batch">Batches</a> &rsaquo;
[% IF batch_id %]
Manage batch number [% batch_id %]
Edit ([% batch_id %])
[% ELSE %]
Create new batch
Create
[% END %]
</div>
<div id="doc3" class="yui-t2">

View File

@ -8,7 +8,7 @@
[% END %]
[% END %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Tools &rsaquo; Label creator &rsaquo; Manage label layouts</title>
<title>Koha &rsaquo; Tools &rsaquo; Label creator &rsaquo; Layouts &rsaquo; [% IF ( layout_id ) %]Edit ([% layout_id %])[% ELSE %]Create[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
<script type="text/JavaScript" language="JavaScript">
//<![CDATA[
@ -51,8 +51,8 @@
<a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo;
<a href="/cgi-bin/koha/labels/label-home.pl">Label creator</a> &rsaquo;
<a href="/cgi-bin/koha/labels/label-manage.pl?label_element=layout">Manage label layouts</a> &rsaquo;
[% IF ( layout_id ) %]Edit[% ELSE %]Create[% END %] Label layout
<a href="/cgi-bin/koha/labels/label-manage.pl?label_element=layout">Layouts</a> &rsaquo;
[% IF ( layout_id ) %]Edit ([% layout_id %])[% ELSE %]Create[% END %]
</div>
<div id="doc3" class="yui-t2">
<div id="bd">
@ -66,7 +66,7 @@
</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>

View File

@ -1,5 +1,5 @@
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Tools &rsaquo; Label creator &rsaquo; Printer profiles</title>
<title>Koha &rsaquo; Tools &rsaquo; Label creator &rsaquo; Profiles &rsaquo; [% IF ( profile_id ) %]Edit ([% profile_id %])[% ELSE %]Create[% END%]</title>
[% INCLUDE 'doc-head-close.inc' %]
<script type="text/javascript">
//<![CDATA[
@ -43,8 +43,8 @@
<a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo;
<a href="/cgi-bin/koha/labels/label-home.pl">Label creator</a> &rsaquo;
<a href="/cgi-bin/koha/labels/label-manage.pl?label_element=profile">Printer profiles</a> &rsaquo;
Edit printer profile
<a href="/cgi-bin/koha/labels/label-manage.pl?label_element=profile">Profiles</a> &rsaquo;
[% IF ( profile_id ) %]Edit ([% profile_id %])[% ELSE %]Create[% END%]
</div>
<div id="doc3" class="yui-t2">
<div id="bd">

View File

@ -1,5 +1,5 @@
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Tools &rsaquo; Label creator &rsaquo; Label templates</title>
<title>Koha &rsaquo; Tools &rsaquo; Label creator &rsaquo; Templates &rsaquo; [% IF ( template_id ) %]Edit ([% template_id %])[% ELSE %]Create[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
<script type="text/javascript">
//<![CDATA[
@ -43,8 +43,8 @@
<a href="/cgi-bin/koha/mainpage.pl">Home</a>&rsaquo;
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>&rsaquo;
<a href="/cgi-bin/koha/labels/label-home.pl">Label creator</a>&rsaquo;
<a href="/cgi-bin/koha/labels/label-manage.pl?label_element=template">Label templates</a>&rsaquo;
Edit label template
<a href="/cgi-bin/koha/labels/label-manage.pl?label_element=template">Templates</a>&rsaquo;
[% IF ( template_id ) %]Edit ([% template_id %])[% ELSE %]Create[% END %]
</div>
<div id="doc3" class="yui-t2">
<div id="bd">

View File

@ -1,5 +1,17 @@
[% 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 &rsaquo; Tools &rsaquo; Label creator &rsaquo; Manage label</title>
<title>Koha &rsaquo; Tools &rsaquo; Label creator &rsaquo; [% PROCESS translate_label_element element=label_element_title %]</title>
[% INCLUDE 'doc-head-close.inc' %]
[% INCLUDE 'greybox.inc' %]
<script type="text/javascript">
@ -77,7 +89,7 @@
<a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo;
<a href="/cgi-bin/koha/labels/label-home.pl">Label creator</a> &rsaquo;
Manage label [% label_element_title %]
[% PROCESS translate_label_element element=label_element_title %]
</div>
<div id="doc3" class="yui-t2">
<div id="bd">

View File

@ -11,6 +11,7 @@
[%- CASE 'Actions' -%]Actions
[%- END -%]
[% END %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Tools &rsaquo; Patron card creator &rsaquo; [% PROCESS translate_card_element element=card_element_title %]</title>
[% INCLUDE 'doc-head-close.inc' %]

View File

@ -18,8 +18,8 @@
# 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 );
@ -98,10 +98,16 @@ my $table = html_table($display_columns->{$label_element}, $db_rows);
$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;