Bugzilla – Attachment 169223 Details for
Bug 36132
Allow users to delete multiple patron lists at once on any page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36132: Allow to delete multiple patron lists on any page
Bug-36132-Allow-to-delete-multiple-patron-lists-on.patch (text/plain), 6.77 KB, created by
Kyle M Hall (khall)
on 2024-07-19 13:37:43 UTC
(
hide
)
Description:
Bug 36132: Allow to delete multiple patron lists on any page
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2024-07-19 13:37:43 UTC
Size:
6.77 KB
patch
obsolete
>From bcdaaf787d54678011e201ebe24aaab93e7d3ac5 Mon Sep 17 00:00:00 2001 >From: Phan Tung Bui <phan-tung.bui@inlibro.com> >Date: Mon, 19 Feb 2024 14:17:42 -0500 >Subject: [PATCH] Bug 36132: Allow to delete multiple patron lists on any page > >Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > .../prog/en/modules/patron_lists/lists.tt | 48 ++++++++----------- > 1 file changed, 21 insertions(+), 27 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt >index 29fd544762f..b579378a0b7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt >@@ -1,13 +1,8 @@ > [% USE raw %] > [% USE Asset %] >-[% PROCESS 'i18n.inc' %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] >-<title>[% FILTER collapse %] >- [% t("Patron lists") | html %] › >- [% t("Tools") | html %] › >- [% t("Koha") | html %] >-[% END %]</title> >+<title>Patron lists › Tools › Koha</title> > [% INCLUDE 'doc-head-close.inc' %] > [% INCLUDE 'greybox.inc' %] > </head> >@@ -32,7 +27,6 @@ > <div class="row"> > <div class="col-sm-10 col-sm-push-2"> > <main> >- [% INCLUDE 'messages.inc' %] > > <div id="toolbar" class="btn-toolbar"> > <div class="btn-group"> >@@ -40,7 +34,7 @@ > </div> > </div> > >- <h1>Patron lists</h1> >+ <h1>Your patron lists </h1> > > [% IF ( lists ) %] > >@@ -83,8 +77,8 @@ > <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="listactions[% l.patron_list_id | html %]"> > <li><a href="/cgi-bin/koha/patron_lists/list.pl?patron_list_id=[% l.patron_list_id | uri %]"><i class="fa fa-user"></i> Add patrons</a></li> > [% UNLESS shared_by_other %] >- <li><a href="/cgi-bin/koha/patron_lists/add-modify.pl?patron_list_id=[% l.patron_list_id | uri %]"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit list</a></li> >- <li><a class="delete_patron" href="/cgi-bin/koha/patron_lists/delete.pl?patron_list_id=[% l.patron_list_id | html %]" data-list-name="[% l.name | html %]"><i class="fa fa-trash-can"></i> Delete list</a></li> >+ <li><a href="/cgi-bin/koha/patron_lists/add-modify.pl?patron_list_id=[% l.patron_list_id | uri %]"><i class="fa fa-pencil"></i> Edit list</a></li> >+ <li><a class="delete_patron" href="/cgi-bin/koha/patron_lists/delete.pl?patron_list_id=[% l.patron_list_id | html %]" data-list-name="[% l.name | html %]"><i class="fa fa-trash"></i> Delete list</a></li> > [% END %] > [% IF ( l.patron_list_patrons_rs.count ) %] > <li class="divider"></li> >@@ -94,14 +88,14 @@ > [% IF CAN_user_tools_edit_patrons %] > <li> > <a href="/cgi-bin/koha/tools/modborrowers.pl?patron_list_id=[% l.patron_list_id | uri %]&op=show"> >- <i class="fa-solid fa-pencil" aria-hidden="true"></i> Batch edit patrons >+ <i class="fa fa-pencil"></i> Batch edit patrons > </a> > </li> > [% END %] > [% IF CAN_user_tools_delete_anonymize_patrons %] > <li> > <a href="/cgi-bin/koha/tools/cleanborrowers.pl?step=2&patron_list_id=[% l.patron_list_id | uri %]&checkbox=borrower"> >- <i class="fa fa-trash-can"></i> Batch delete patrons >+ <i class="fa fa-trash"></i> Batch delete patrons > </a> > </li> > [% END %] >@@ -147,8 +141,8 @@ > [% MACRO jsinclude BLOCK %] > [% Asset.js("js/tools-menu.js") | $raw %] > [% INCLUDE 'datatables.inc' %] >- > <script> >+ > $(document).ready(function() { > var patronExportModal = $("#patronExportModal"); > var patronExportModalBody = $("#patronExportModal .modal-body"); >@@ -157,10 +151,10 @@ > > $('#patron-lists-table').dataTable($.extend(true, {}, dataTablesDefaults, { > "autoWidth": false, >- "columnDefs": [ >- { "orderable": false, "searchable": false, "targets": [ 'NoSort' ] } >+ "aoColumnDefs": [ >+ {"bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ]} > ], >- "pagingType": "full" >+ "sPaginationType": "full" > } )); > $(".delete_patron").on("click", function(){ > $(".dropdown").removeClass("open"); >@@ -177,18 +171,18 @@ > } > }); > >- $(".select_patron").on("click", function() { >- if($(this).is(':checked')){ >- $("#delete_selected_lists").attr("class","btn btn-default btn-sm"); >- selectedPatronLists.push($(this).data("patron-list-id")); >- } >- else { >- selectedPatronLists = selectedPatronLists.filter(item => item !== $(this).data("patron-list-id")); >- if(selectedPatronLists.length === 0){ >- $("#delete_selected_lists").attr("class","btn btn-default btn-sm disabled"); >- } >+ $(document).on("click", ".select_patron", function() { >+ if($(this).is(':checked')){ >+ $("#delete_selected_lists").attr("class","btn btn-default btn-sm"); >+ selectedPatronLists.push($(this).data("patron-list-id")); >+ } >+ else { >+ selectedPatronLists = selectedPatronLists.filter(item => item !== $(this).data("patron-list-id")); >+ if(selectedPatronLists.length === 0){ >+ $("#delete_selected_lists").attr("class","btn btn-default btn-sm disabled"); > } >- }); >+ } >+ }); > > $(".print_cards").on("click", function(e){ > e.preventDefault(); >-- >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 36132
:
162283
|
165486
|
169223
|
170237
|
170699
|
174548