Bugzilla – Attachment 177587 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.21 KB, created by
Owen Leonard
on 2025-02-06 16:14:11 UTC
(
hide
)
Description:
Bug 37250: (follow-up) More improvements to menus
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2025-02-06 16:14:11 UTC
Size:
12.21 KB
patch
obsolete
>From 59dc72de415ece748a090c5d0f09a3473f81bd94 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 2e504b2761..58f9057dfd 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-bs-toggle="dropdown" aria-expanded="false"><i class="fa fa-plus"></i> New</button> > <ul class="dropdown-menu"> > <li><a class="dropdown-item" href="/cgi-bin/koha/labels/label-edit-batch.pl?op=new">Label batch</a></li> >- <li><a class="dropdown-item" href="/cgi-bin/koha/labels/label-edit-layout.pl?op=new">Layout</a></li> >+ <li><a class="dropdown-item" href="/cgi-bin/koha/labels/label-edit-layout.pl?op=new">Label layout</a></li> > <li><a class="dropdown-item" href="/cgi-bin/koha/labels/label-edit-template.pl?op=new">Label template</a></li> > <li><a class="dropdown-item" href="/cgi-bin/koha/labels/label-edit-profile.pl?op=new">Printer profile</a></li> >- <li><a class="dropdown-item" 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 663312e0d3..5e4ef0649a 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 >@@ -11,7 +11,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 %] >@@ -33,7 +33,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 %] >@@ -221,6 +221,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 540ea23f9a..401f8a3f2f 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 >@@ -18,7 +18,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 %] >@@ -47,7 +47,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 ) %] >@@ -234,6 +234,7 @@ > </div> <!-- /.main.container-fluid --> > > [% 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 708a54820e..5b7aee33ca 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 >@@ -9,7 +9,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 %] >@@ -31,7 +31,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 ) %] >@@ -154,6 +154,7 @@ > </div> <!-- /.main.container-fluid --> > > [% 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 da7da1d90a..ca10885e09 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 >@@ -9,7 +9,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 %] >@@ -31,7 +31,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 ) %] >@@ -200,6 +200,7 @@ > </div> <!-- /.main.container-fluid --> > > [% 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 f017f0d4e5..39a92f25eb 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 >@@ -42,6 +42,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.5
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
|
177586
| 177587