Bugzilla – Attachment 169307 Details for
Bug 37250
Redesign labels home page to match other module home pages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37250: (follow-up) More improvements to menus
Bug-37250-follow-up-More-improvements-to-menus.patch (text/plain), 12.04 KB, created by
Owen Leonard
on 2024-07-22 14:31:41 UTC
(
hide
)
Description:
Bug 37250: (follow-up) More improvements to menus
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2024-07-22 14:31:41 UTC
Size:
12.04 KB
patch
obsolete
>From 2718da5c67ff0c0e277496e67ddbc5881e290541 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 22 Jul 2024 14:26:27 +0000 >Subject: [PATCH] Bug 37250: (follow-up) More improvements to menus > >- Add highlighting to new sidebar menu >- Make labels more consistent in menus, breadcrumbs, and titles >- Add 'Print barcode range' link to the labels home page and sidebar > menu. >--- > .../prog/en/includes/labels-menu.inc | 29 ++++--------------- > .../prog/en/includes/labels-toolbar.inc | 3 +- > .../en/modules/labels/label-edit-batch.tt | 5 ++-- > .../en/modules/labels/label-edit-layout.tt | 5 ++-- > .../en/modules/labels/label-edit-profile.tt | 5 ++-- > .../en/modules/labels/label-edit-template.tt | 5 ++-- > .../prog/en/modules/labels/label-home.tt | 1 + > .../intranet-tmpl/prog/js/labels-menu.js | 14 +++++++++ > 8 files changed, 33 insertions(+), 34 deletions(-) > create mode 100644 koha-tmpl/intranet-tmpl/prog/js/labels-menu.js > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/labels-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/labels-menu.inc >index c9a873a770..5992b6a2e6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/labels-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/labels-menu.inc >@@ -1,28 +1,9 @@ > <div id="labels-menu" class="sidebar_menu"> > <ul> >- [% IF ( label_element_title == "Batches" ) %] >- <li><a class="current" href="/cgi-bin/koha/labels/label-manage.pl?label_element=batch">Label batches</a></li> >- [% ELSE -%] >- <li><a href="/cgi-bin/koha/labels/label-manage.pl?label_element=batch">Label batches</a></li> >- [% END %] >- >- [% IF ( label_element_title == "Layouts" ) %] >- <li><a class="current" href="/cgi-bin/koha/labels/label-manage.pl?label_element=layout">Label layouts</a></li> >- [% ELSE -%] >- <li><a href="/cgi-bin/koha/labels/label-manage.pl?label_element=layout">Label layouts</a></li> >- [% END %] >- >- [% IF ( label_element_title == "Templates" ) %] >- <li><a class="current" href="/cgi-bin/koha/labels/label-manage.pl?label_element=template">Label templates</a></li> >- [% ELSE -%] >- <li><a href="/cgi-bin/koha/labels/label-manage.pl?label_element=template">Label templates</a></li> >- [% END %] >- >- [% IF ( label_element_title == "Profiles" ) %] >- <li><a class="current" href="/cgi-bin/koha/labels/label-manage.pl?label_element=profile">Printer profiles</a></li> >- [% ELSE -%] >- <li><a href="/cgi-bin/koha/labels/label-manage.pl?label_element=profile">Printer profiles</a></li> >- [% END %] >- >+ <li><a href="/cgi-bin/koha/labels/label-manage.pl?label_element=batch">Label batches</a></li> >+ <li><a href="/cgi-bin/koha/labels/label-manage.pl?label_element=layout">Label layouts</a></li> >+ <li><a href="/cgi-bin/koha/labels/label-manage.pl?label_element=template">Label templates</a></li> >+ <li><a href="/cgi-bin/koha/labels/label-manage.pl?label_element=profile">Printer profiles</a></li> >+ <li><a href="/cgi-bin/koha/labels/label-edit-range.pl">Print barcode range</a></li> > </ul> > </div> <!-- /.sidebar_menu --> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/labels-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/labels-toolbar.inc >index 00d2113308..982892f140 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/labels-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/labels-toolbar.inc >@@ -3,10 +3,9 @@ > <button class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus"></i> New <span class="caret"></span></button> > <ul class="dropdown-menu"> > <li><a href="/cgi-bin/koha/labels/label-edit-batch.pl?op=new">Label batch</a></li> >- <li><a href="/cgi-bin/koha/labels/label-edit-layout.pl?op=new">Layout</a></li> >+ <li><a href="/cgi-bin/koha/labels/label-edit-layout.pl?op=new">Label layout</a></li> > <li><a href="/cgi-bin/koha/labels/label-edit-template.pl?op=new">Label template</a></li> > <li><a href="/cgi-bin/koha/labels/label-edit-profile.pl?op=new">Printer profile</a></li> >- <li><a href="/cgi-bin/koha/labels/label-edit-range.pl">Barcode range</a></li> > </ul> > </div> > </div> >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 f89d9787ec..c8ee384deb 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 >@@ -10,7 +10,7 @@ > [% ELSE %] > [% t("New label batch") | html %] > [% END %] › >- [% t("Batches") | html %] › >+ [% t("Label batches") | html %] › > [% t("Label creator") | html %] › > [% t("Cataloging") | html %] › > [% t("Koha") | html %] >@@ -32,7 +32,7 @@ > <a href="/cgi-bin/koha/labels/label-home.pl">Label creator</a> > [% END %] > [% WRAPPER breadcrumb_item %] >- <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=batch">Batches</a> >+ <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=batch">Label batches</a> > [% END %] > [% WRAPPER breadcrumb_item bc_active= 1 %] > [% IF description %] >@@ -216,6 +216,7 @@ > [% INCLUDE 'greybox.inc' %] > [% INCLUDE 'datatables.inc' %] > [% Asset.js("js/form-submit.js") | $raw %] >+ [% Asset.js("js/labels-menu.js") | $raw %] > <script> > function dofocus() { // named function req'd for body onload event by some FF and IE7 security models > $(".focus:last").select(); >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 b4295d7a9d..87c0649b36 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 >@@ -17,7 +17,7 @@ > [% ELSE %] > [% t("New label layout") | html %] > [% END %] › >- [% t("Layouts") | html %] › >+ [% t("Label layouts") | html %] › > [% t("Label creator") | html %] › > [% t("Cataloging") | html %] › > [% t("Koha") | html %] >@@ -46,7 +46,7 @@ > <a href="/cgi-bin/koha/labels/label-home.pl">Label creator</a> > [% END %] > [% WRAPPER breadcrumb_item %] >- <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=layout">Layouts</a> >+ <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=layout">Label layouts</a> > [% END %] > [% WRAPPER breadcrumb_item bc_active= 1 %] > [% IF ( layout_id ) %] >@@ -232,6 +232,7 @@ > </div> <!-- /.row --> > > [% MACRO jsinclude BLOCK %] >+ [% Asset.js("js/labels-menu.js") | $raw %] > <script> > $(document).ready(function() { > $('.sidebar_menu a[href$="/cgi-bin/koha/labels/label-home.pl"]').addClass("current"); >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 18a47fb886..868e327788 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 >@@ -8,7 +8,7 @@ > [% ELSE %] > [% t("New printer profile") | html %] > [% END%] › >- [% t("Profiles") | html %] › >+ [% t("Printer profiles") | html %] › > [% t("Label creator") | html %] › > [% t("Cataloging") | html %] › > [% t("Koha") | html %] >@@ -30,7 +30,7 @@ > <a href="/cgi-bin/koha/labels/label-home.pl">Label creator</a> > [% END %] > [% WRAPPER breadcrumb_item %] >- <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=profile">Profiles</a> >+ <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=profile">Printer profiles</a> > [% END %] > [% WRAPPER breadcrumb_item bc_active= 1 %] > [% IF ( profile_id ) %] >@@ -152,6 +152,7 @@ > </div> <!-- /.row --> > > [% MACRO jsinclude BLOCK %] >+ [% Asset.js("js/labels-menu.js") | $raw %] > <script> > $(document).ready(function(){ > $('.sidebar_menu a[href$="/cgi-bin/koha/labels/label-home.pl"]').addClass("current"); >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 c1c38d726d..3c910d51b0 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 >@@ -8,7 +8,7 @@ > [% ELSE %] > [% t("New label template") | html %] > [% END %] › >- [% t("Templates") | html %] › >+ [% t("Label templates") | html %] › > [% t("Label creator") | html %] › > [% t("Cataloging") | html %] › > [% t("Koha") | html %] >@@ -30,7 +30,7 @@ > <a href="/cgi-bin/koha/labels/label-home.pl">Label creator</a> > [% END %] > [% WRAPPER breadcrumb_item %] >- <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=template">Templates</a> >+ <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=template">Label templates</a> > [% END %] > [% WRAPPER breadcrumb_item bc_active= 1 %] > [% IF ( template_id ) %] >@@ -198,6 +198,7 @@ > </div> <!-- /.row --> > > [% MACRO jsinclude BLOCK %] >+ [% Asset.js("js/labels-menu.js") | $raw %] > <script> > $(document).ready(function(){ > $('.sidebar_menu a[href$="/cgi-bin/koha/labels/label-home.pl"]').addClass("current"); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-home.tt >index d97e704968..5da72b129f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-home.tt >@@ -41,6 +41,7 @@ > <li><a href="/cgi-bin/koha/labels/label-manage.pl?label_element=layout"><i class="fa-solid fa-object-group"></i> Layouts</a></li> > <li><a href="/cgi-bin/koha/labels/label-manage.pl?label_element=template"><i class="fa-solid fa-table-cells"></i> Label templates</a></li> > <li><a href="/cgi-bin/koha/labels/label-manage.pl?label_element=profile"><i class="fa fa-print"></i> Printer profiles</a></li> >+ <li><a href="/cgi-bin/koha/labels/label-edit-range.pl"><i class="fa fa-barcode"></i> Print barcode range</a></li> > </ul> > </div> > </div> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/labels-menu.js b/koha-tmpl/intranet-tmpl/prog/js/labels-menu.js >new file mode 100644 >index 0000000000..c1ff7950ee >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/js/labels-menu.js >@@ -0,0 +1,14 @@ >+$(document).ready(function() { >+ var path = location.pathname.substring(1); >+ if (path.indexOf("label-edit-batch") >= 0 ) { >+ $('#labels-menu a[href$="/cgi-bin/koha/labels/label-manage.pl?label_element=batch"]').addClass("current"); >+ } else if (path.indexOf("label-edit-layout") >= 0 ) { >+ $('#labels-menu a[href$="/cgi-bin/koha/labels/label-manage.pl?label_element=layout"]').addClass("current"); >+ } else if (path.indexOf("label-edit-template") >= 0 ) { >+ $('#labels-menu a[href$="/cgi-bin/koha/labels/label-manage.pl?label_element=template"]').addClass("current"); >+ } else if (path.indexOf("label-edit-profile") >= 0 ) { >+ $('#labels-menu a[href$="/cgi-bin/koha/labels/label-manage.pl?label_element=profile"]').addClass("current"); >+ } else if (path.indexOf("label-edit-range") >= 0 ) { >+ $('#labels-menu a[href$="/cgi-bin/koha/labels/label-edit-range.pl"]').addClass("current"); >+ } >+}); >-- >2.39.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 37250
:
168470
|
168563
|
168569
|
169307
|
171067
|
171068