Bugzilla – Attachment 165605 Details for
Bug 35628
Add optional statuses to catalog concerns
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35628: Add status filters to top bar
Bug-35628-Add-status-filters-to-top-bar.patch (text/plain), 4.15 KB, created by
Marcel de Rooy
on 2024-04-26 07:09:06 UTC
(
hide
)
Description:
Bug 35628: Add status filters to top bar
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2024-04-26 07:09:06 UTC
Size:
4.15 KB
patch
obsolete
>From a532dea82bb7c1e2f97eec558a760fa7037de1c0 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 28 Dec 2023 10:04:36 +0000 >Subject: [PATCH] Bug 35628: Add status filters to top bar >Content-Type: text/plain; charset=utf-8 > >This patch adds status filters to the top toolbar alongside the existing >filter on resolved. > >Signed-off-by: Esther Melander <esther@bywatersolutions.com> >Signed-off-by: Ray Delahunty <lib-systems@arts.ac.uk> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../prog/en/modules/cataloguing/concerns.tt | 38 +++++++++++++++++-- > 1 file changed, 34 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt >index 49f01ef6db..9a89714f75 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt >@@ -1,6 +1,8 @@ > [% USE raw %] > [% USE Asset %] >+[% USE AuthorisedValues %] > [% PROCESS 'i18n.inc' %] >+[% SET status = AuthorisedValues.GetAuthValueDropbox('TICKET_STATUS') %] > [% SET footerjs = 1 %] > [% USE TablesSettings %] > [% INCLUDE 'doc-head-open.inc' %] >@@ -42,6 +44,9 @@ > <div class="page-section"> > <fieldset class="action filters" style="cursor:pointer;"> > <a id="resolved_filter" class="filtered"><i class="fa fa-bars"></i> Include resolved</a> >+ [% FOR st IN status %] >+ | <a id="[% st.authorised_value | html %]_filter"><i class="fa fa-filter"></i> Filter [% st.lib | html %]</a> >+ [% END %] > </fieldset> > > <table id="table_concerns"> >@@ -195,19 +200,44 @@ > }, > }, table_settings, 1, additional_filters); > >- var txtActivefilter = _("Filter resolved"); >- var txtInactivefilter = _("Include resolved"); >+ var txtActivefilter = _("Include resolved"); >+ var txtInactivefilter = _("Filter resolved"); > $('#resolved_filter').on("click", function() { > if ($(this).hasClass('filtered')){ > filter_resolved = false; >- $(this).html('<i class="fa fa-bars"></i> '+txtActivefilter); >+ $(this).html('<i class="fa fa-filter"></i> '+txtActivefilter); > } else { > filter_resolved = true; >- $(this).html('<i class="fa fa-filter"></i> '+txtInactivefilter); >+ $(this).html('<i class="fa fa-bars"></i> '+txtInactivefilter); > } > tickets.DataTable().draw(); > $(this).toggleClass('filtered'); > }); >+ >+ [% FOR st IN status %] >+ $('#[% st.authorised_value | html %]_filter').on("click", function() { >+ if ($(this).hasClass('filtered')){ >+ additional_filters.status.find((o, i) => { >+ if (o["!="] === '[% st.authorised_value | html %]') { >+ additional_filters.status.splice(i, 1); >+ return true; // stop searching >+ } >+ }); >+ if ( additional_filters.status.length === 1 ){ >+ delete additional_filters.status; >+ } >+ $(this).html('<i class="fa fa-filter"></i> '+_("Filter ")+"[% st.lib | html %]"); >+ } else { >+ if (!additional_filters.hasOwnProperty("status")) { >+ additional_filters.status = [ '-and' ]; >+ } >+ additional_filters.status.push({ '!=': "[% st.authorised_value | html %]" }); >+ $(this).html('<i class="fa fa-bars"></i> '+_("Include ")+"[% st.lib | html %]"); >+ } >+ tickets.DataTable().draw(); >+ $(this).toggleClass('filtered'); >+ }); >+ [% END %] > }); > </script> > [% Asset.js("js/modals/display_ticket.js") | $raw %] >-- >2.30.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 35628
:
160255
|
160256
|
160257
|
160258
|
160259
|
160268
|
160269
|
160270
|
160271
|
160272
|
160273
|
160274
|
160286
|
160287
|
160288
|
160289
|
160290
|
160308
|
160309
|
160310
|
160311
|
160312
|
160313
|
160314
|
160315
|
160316
|
160317
|
160318
|
160319
|
160320
|
160329
|
160330
|
160331
|
160332
|
160333
|
160334
|
160335
|
160364
|
162500
|
164912
|
164913
|
164914
|
164915
|
164916
|
164917
|
164918
|
165551
|
165552
|
165553
|
165554
|
165555
|
165556
|
165557
|
165560
|
165561
|
165562
|
165563
|
165564
|
165599
|
165600
|
165601
|
165602
|
165603
|
165604
|
165605
|
165606
|
165607
|
165608
|
165622
|
165623
|
165624
|
165625
|
165626
|
165627
|
165628
|
165629
|
165630
|
165631
|
165770
|
165771
|
165772
|
165773
|
165774
|
165775
|
165776
|
165777
|
165778
|
165779