Bugzilla – Attachment 179077 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), 13.20 KB, created by
Owen Leonard
on 2025-03-07 13:05:14 UTC
(
hide
)
Description:
Bug 37250: (follow-up) More improvements to menus
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2025-03-07 13:05:14 UTC
Size:
13.20 KB
patch
obsolete
>From 792bd474d1d707d8b9a977966928e0b20e785f3a 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 | 28 ++++--------------- > .../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 | 5 +++- > .../intranet-tmpl/prog/js/labels-menu.js | 24 ++++++++++++++++ > 8 files changed, 46 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 065b2918294..7f9d2e734b5 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,10 @@ > <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 2e504b27612..58f9057dfd1 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 b1b712a7a37..5b93b9b4f96 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 >@@ -12,7 +12,7 @@ > [% ELSE %] > [% t("New label batch") | html %] > [% END %] >- › [% t("Batches") | html %] › [% t("Label creator") | html %] › [% t("Cataloging") | html %] › [% t("Koha") | html %] >+ › [% t("Label batches") | html %] › [% t("Label creator") | html %] › [% t("Cataloging") | html %] › [% t("Koha") | html %] > [% END %]</title > > > [% INCLUDE 'doc-head-close.inc' %] >@@ -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 %] >@@ -231,6 +231,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 075ff673e05..73bd4d53fa4 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 >@@ -25,7 +25,7 @@ > [% ELSE %] > [% t("New label layout") | html %] > [% END %] >- › [% t("Layouts") | html %] › [% t("Label creator") | html %] › [% t("Cataloging") | html %] › [% t("Koha") | html %] >+ › [% t("Label layouts") | html %] › [% t("Label creator") | html %] › [% t("Cataloging") | html %] › [% t("Koha") | html %] > [% END %]</title > > > [% INCLUDE 'doc-head-close.inc' %] >@@ -55,7 +55,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 ) %] >@@ -229,6 +229,7 @@ > [% END %] > > [% 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 39e40bfa7bd..02e3f9ab39e 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 >@@ -10,7 +10,7 @@ > [% ELSE %] > [% t("New printer profile") | html %] > [% END %] >- › [% t("Profiles") | html %] › [% t("Label creator") | html %] › [% t("Cataloging") | html %] › [% t("Koha") | html %] >+ › [% t("Printer profiles") | html %] › [% t("Label creator") | html %] › [% t("Cataloging") | html %] › [% t("Koha") | html %] > [% END %]</title > > > [% INCLUDE 'doc-head-close.inc' %] >@@ -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 ) %] >@@ -129,6 +129,7 @@ > [% END %] > > [% 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 5a9f43b66ed..9e17a6ec81a 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 >@@ -10,7 +10,7 @@ > [% ELSE %] > [% t("New label template") | html %] > [% END %] >- › [% t("Templates") | html %] › [% t("Label creator") | html %] › [% t("Cataloging") | html %] › [% t("Koha") | html %] >+ › [% t("Label templates") | html %] › [% t("Label creator") | html %] › [% t("Cataloging") | html %] › [% t("Koha") | html %] > [% END %]</title > > > [% INCLUDE 'doc-head-close.inc' %] >@@ -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 ) %] >@@ -171,6 +171,7 @@ > [% END %] > > [% 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 1c984283358..b02c0445bc8 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 >@@ -39,7 +39,7 @@ > ><a href="/cgi-bin/koha/labels/label-manage.pl?label_element=batch"><i class="fa-solid fa-list-ul"></i> Label batches</a></li > > > <li >- ><a href="/cgi-bin/koha/labels/label-manage.pl?label_element=layout"><i class="fa-solid fa-object-group"></i> Layouts</a></li >+ ><a href="/cgi-bin/koha/labels/label-manage.pl?label_element=layout"><i class="fa-solid fa-object-group"></i> Label 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 >@@ -47,6 +47,9 @@ > <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 00000000000..c5d49d4da24 >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/js/labels-menu.js >@@ -0,0 +1,24 @@ >+$(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
|
179076
|
179077
|
179112
|
179113