Bugzilla – Attachment 184150 Details for
Bug 40412
Update the patron card export process to avoid Greybox modal
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40412: Update the patron card export process to avoid Greybox modal
Bug-40412-Update-the-patron-card-export-process-to.patch (text/plain), 10.38 KB, created by
Caroline Cyr La Rose
on 2025-07-16 13:36:49 UTC
(
hide
)
Description:
Bug 40412: Update the patron card export process to avoid Greybox modal
Filename:
MIME Type:
Creator:
Caroline Cyr La Rose
Created:
2025-07-16 13:36:49 UTC
Size:
10.38 KB
patch
obsolete
>From 8e66b2a77b1ffab577bed121cc3f550d6c0454b3 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 16 Jul 2025 12:17:31 +0000 >Subject: [PATCH] Bug 40412: Update the patron card export process to avoid > Greybox modal > >This patch updates the patron card export process to eliminate the use >of the Greybox modal, opting to move from page to page through the >process. > >Tangentially related: I updated the DataTables table configuration of >the tables on the patron card batch management page and patron card >batch edit page in order to remove the DataTables "Export" button >because of the possibility that its presence might be confusing. > >To test apply the patch and go to Tools -> Patron card creator. > >- Create more than one batch add multiple patrons to each. >- From the patron card batches page, test the process of exporting > patron cards, observing at each step the page title and breadcrumbs. > - Check a box next to a single batch and click the "Export selected > batches" button at the bottom. > - Check multiple boxes and click "Export selected batches." > - Click "Edit" on one of the batches > - In the list of patrons, check one or more checkboxes, and click > "Export selected card(s)." > - Click an individual "Export" button from the list of patrons. > - Click "Export card batch". > - Select a list from the "Patron list" dropdown and click "Export from > patron list." >- In each case, you should be forwarded to a new page for choosing > patron card options. > - After submitting the form, you should be forwarded to another page > where you can download the batch as a PDF. >- Test the new "Return to patron card batches" to confirm that it takes > you to the patron card batches page. > >Sponsored-by: Athens County Public Libraries >Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> >--- > .../prog/en/modules/patroncards/edit-batch.tt | 8 +- > .../prog/en/modules/patroncards/manage.tt | 6 +- > .../prog/en/modules/patroncards/print.tt | 82 +++++++++++-------- > 3 files changed, 54 insertions(+), 42 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt >index 1ee578a3b22..bcbed141cdf 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt >@@ -173,7 +173,6 @@ > [% END %] > > [% MACRO jsinclude BLOCK %] >- [% INCLUDE 'greybox.inc' %] > [% INCLUDE 'datatables.inc' %] > [% Asset.js("js/tools-menu.js") | $raw %] > <script> >@@ -265,9 +264,9 @@ > alert(_("Please select at least one card to export.")); > return; // no batch selected > } >- return GB_showCenter(_("Export patron cards"), "/cgi-bin/koha/patroncards/print.pl?batch_id=[% batch_id | html %]&" + getstr, 400, 800); >+ location.href = "/cgi-bin/koha/patroncards/print.pl?batch_id=[% batch_id | html %]&" + getstr; > } else if (mode == 'batch') { >- return GB_showCenter(_("Export patron cards"), "/cgi-bin/koha/patroncards/print.pl?batch_id=[% batch_id | html %]", 400, 800); >+ location.href = "/cgi-bin/koha/patroncards/print.pl?batch_id=[% batch_id | html %]"; > } else { > // some pass-through error trapping just in case... > } >@@ -310,6 +309,7 @@ > $("#description").hide(); > [% END %] > $("#batcht").kohaTable({ >+ dom: '<"dt-info"i><"top pager"<"table_entries"lp><"table_controls"f>>tr<"bottom pager"ip>', > order: [[0, "asc"]], > pagingType: "full", > lengthMenu: [aLengthMenu, aLengthMenuLabel], >@@ -351,7 +351,7 @@ > e.preventDefault(); > var label_id = $(this).data("label-id"); > var batch_id = $(this).data("batch-id"); >- GB_showCenter( _("Export single card"),'/cgi-bin/koha/patroncards/print.pl?batch_id=' + batch_id + '&label_id=' + label_id, 400, 800); >+ location.href = "/cgi-bin/koha/patroncards/print.pl?batch_id=" + batch_id + "&label_id=" + label_id; > }); > > $("#savedesc").click(function(event){ >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt >index c7ebc694bb2..1070746b61d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt >@@ -249,7 +249,7 @@ > alert(_("Please select at least one batch to export.")); > return; // no batch selected > } >- return GB_showCenter(_("Export patron cards"), "/cgi-bin/koha/patroncards/print.pl?" + getstr, 400, 800); >+ location.href = "/cgi-bin/koha/patroncards/print.pl?" + getstr; > }; > > function XportPatronlist() { >@@ -258,7 +258,7 @@ > return; // no patron list selected > } > getstr = 'patronlist_id='+patron_list_id.value; >- return GB_showCenter(_("Export patron cards from list"), "/cgi-bin/koha/patroncards/print.pl?" + getstr, 700, 800); >+ location.href = "/cgi-bin/koha/patroncards/print.pl?" + getstr; > }; > > function selected_layout(op) { >@@ -328,7 +328,7 @@ > $(".export").on("click", function(e){ > e.preventDefault(); > var batch_id = $(this).data("batch-id"); >- GB_showCenter( _("Export single batch"),'/cgi-bin/koha/patroncards/print.pl?batch_id='+batch_id, 400, 800); >+ location.href = "/cgi-bin/koha/patroncards/print.pl?batch_id=" + batch_id; > }); > }); > </script> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/print.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/print.tt >index 7ee41c37c8d..21f00cccef3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/print.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/print.tt >@@ -3,22 +3,43 @@ > [% PROCESS 'i18n.inc' %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] >-<title >- >[% FILTER collapse %] >- [% t("Patron card printing/exporting") | html %] >+<title> >+ [% FILTER collapse %] >+ [% t("Export") | html %] > › [% t("Patron cards") | html %] › [% t("Tools") | html %] › [% t("Koha") | html %] >- [% END %]</title >-> >-[% INCLUDE 'doc-head-close.inc' popup => 1 %] >+ [% END %] >+</title> >+[% INCLUDE 'doc-head-close.inc' %] > </head> > >-<body id="pcard_print" class="tools pcard"> >-<div class="container-fluid"> >- <h1>Patron card printing/exporting</h1> >+<body id="pcard_edit-batch" class="tools pcard"> >+[% WRAPPER 'header.inc' %] >+ [% INCLUDE 'cat-search.inc' %] >+[% END %] >+ >+[% WRAPPER 'sub-header.inc' %] >+ [% WRAPPER breadcrumbs %] >+ [% WRAPPER breadcrumb_item %] >+ <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> >+ [% END %] >+ [% WRAPPER breadcrumb_item %] >+ <a href="/cgi-bin/koha/patroncards/home.pl">Patron card creator</a> >+ [% END %] >+ [% WRAPPER breadcrumb_item %] >+ <a href="/cgi-bin/koha/patroncards/manage.pl?card_element=batch">Batches</a> >+ [% END %] >+ [% WRAPPER breadcrumb_item bc_active= 1 %] >+ <span>Export</span> >+ [% END %] >+ [% END #/ WRAPPER breadcrumbs %] >+[% END #/ WRAPPER sub-header.inc %] >+ >+[% WRAPPER 'main-container.inc' %] >+ <h1>Patron card export</h1> > [% IF ( batches ) %] > <form method="get"> >- <h3>Click on the following link(s) to download the exported batch(es).</h3> >- <fieldset> >+ <h3>Click any of the following links to download the exported batch</h3> >+ <div class="page-section"> > [% FOREACH batche IN batches %] > [% IF ( batche.label_ids ) %] > <legend>[% batche.card_count | html %] Single patron cards</legend> >@@ -49,22 +70,25 @@ > </p> > [% END %] > [% END %] >- </fieldset> >+ </div> > > <fieldset class="action"> >- <input type="button" class="gb-close" value="Done" /> >+ <a href="/cgi-bin/koha/patroncards/manage.pl?card_element=batch" class="btn btn-default">Return to patron card batches</a> > </fieldset> > </form> > [% ELSIF ( patronlist_id && template_id && layout_id ) %] > <div id="export_patron_list"> >- <h3>Click on the link to download the patron cards from the patron list.</h3> >- <p> >- <a >- class="document pdf" >- href="/cgi-bin/koha/patroncards/create-pdf.pl?patronlist_id=[% patronlist_id | html %]&template_id=[% template_id | html %]&layout_id=[% layout_id | html %]&layout_back_id=[% layout_back_id | html %]&start_card=[% start_card | html %]&order_by=[% order_by | html %]" >- >label_patronlist_[% patronlist_id | html %].pdf</a >- > >- </p> >+ <h3>Click any of the following links to download the exported batch</h3> >+ <div class="page-section"> >+ <p> >+ <a >+ class="document pdf" >+ href="/cgi-bin/koha/patroncards/create-pdf.pl?patronlist_id=[% patronlist_id | html %]&template_id=[% template_id | html %]&layout_id=[% layout_id | html %]&layout_back_id=[% layout_back_id | html %]&start_card=[% start_card | html %]&order_by=[% order_by | html %]" >+ > >+ label_patronlist_[% patronlist_id | html %].pdf >+ </a> >+ </p> >+ </div> > </div> > [% ELSE %] > <h3> >@@ -143,21 +167,9 @@ > </fieldset> > </form> > [% END %] >-</div> >-<!-- /.container-fluid --> >+[% END %] > > [% MACRO jsinclude BLOCK %] >- [% INCLUDE 'greybox.inc' %] >- <script> >- function Done() { >- window.location = "[% referer | html %]"; >- }; >- $(document).ready(function(){ >- $(".gb-close").on("click",function(){ >- parent.parent.GB_hide(); >- }); >- }); >- </script> > [% END %] > >-[% INCLUDE 'popup-bottom.inc' %] >+[% INCLUDE 'intranet-bottom.inc' %] >-- >2.43.0
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 40412
:
184149
| 184150 |
184163
|
184170