Bugzilla – Attachment 44097 Details for
Bug 15072
Breadcrumbs and titles inconsistent in Label creator
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15072: Breadcrumbs and titles inconsistent in Label creator
Bug-15072-Breadcrumbs-and-titles-inconsistent-in-L.patch (text/plain), 10.62 KB, created by
Tomás Cohen Arazi (tcohen)
on 2015-10-27 18:25:16 UTC
(
hide
)
Description:
Bug 15072: Breadcrumbs and titles inconsistent in Label creator
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2015-10-27 18:25:16 UTC
Size:
10.62 KB
patch
obsolete
>From fd15837c69545f39c0ee78d31380ef0a4e411628 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 27 Oct 2015 15:15:16 -0300 >Subject: [PATCH] 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 >--- > .../prog/en/modules/labels/label-edit-batch.tt | 8 ++++---- > .../prog/en/modules/labels/label-edit-layout.tt | 8 ++++---- > .../prog/en/modules/labels/label-edit-profile.tt | 6 +++--- > .../prog/en/modules/labels/label-edit-template.tt | 6 +++--- > .../prog/en/modules/labels/label-manage.tt | 16 ++++++++++++++-- > .../prog/en/modules/patroncards/manage.tt | 1 + > labels/label-manage.pl | 18 ++++++++++++------ > 7 files changed, 41 insertions(+), 22 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt >index 61485a9..27fb318 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt >@@ -1,6 +1,6 @@ > [% 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" /> >@@ -160,11 +160,11 @@ > <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"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-layout.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-layout.tt >index f36bdab..5e813a0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-layout.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-layout.tt >@@ -8,7 +8,7 @@ > [% 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[ >@@ -51,8 +51,8 @@ > <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"> >@@ -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> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-profile.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-profile.tt >index 5fb86a6..9318b85 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-profile.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-profile.tt >@@ -1,5 +1,5 @@ > [% 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[ >@@ -43,8 +43,8 @@ > <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"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-template.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-template.tt >index 051d945..a7f2c3a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-template.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-template.tt >@@ -1,5 +1,5 @@ > [% 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[ >@@ -43,8 +43,8 @@ > <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"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt >index 6a47457..dfa17de 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt >@@ -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 › 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"> >@@ -77,7 +89,7 @@ > <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"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt >index aba2862..58feb0e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt >@@ -11,6 +11,7 @@ > [%- 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' %] >diff --git a/labels/label-manage.pl b/labels/label-manage.pl >index bee2473..3399c8f 100755 >--- a/labels/label-manage.pl >+++ b/labels/label-manage.pl >@@ -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; >-- >2.6.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15072
:
44097
|
44098
|
44099
|
44120
|
44170
|
44171
|
44172
|
44173
|
44188
|
44189
|
44190
|
44191