Bugzilla – Attachment 192154 Details for
Bug 30221
Make the tables on opac-user.tt column configurable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30221: make the tables on opac-user.tt configurable
Bug-30221-make-the-tables-on-opac-usertt-configura.patch (text/plain), 12.97 KB, created by
Arthur Suzuki
on 2026-01-29 15:48:36 UTC
(
hide
)
Description:
Bug 30221: make the tables on opac-user.tt configurable
Filename:
MIME Type:
Creator:
Arthur Suzuki
Created:
2026-01-29 15:48:36 UTC
Size:
12.97 KB
patch
obsolete
>From 4d9ec7c82f64ecee25a7966d8ef794d68fb447df Mon Sep 17 00:00:00 2001 >From: Arthur Suzuki <arthur.suzuki@biblibre.com> >Date: Thu, 26 Sep 2024 17:22:27 +0200 >Subject: [PATCH] Bug 30221: make the tables on opac-user.tt configurable > >Test plan: >- apply patch >- as an admin go to Administration / Table settings / Opac / Patron details >- hide a few columns (duedate, barcode) >- make a couple checkouts and/or holds for a patron >- login to the opac as this patron >- verify the tables on the patron account table is missing the selected columns > >sponsored-by: Lyon 2 University >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >--- > admin/columns_settings.yml | 71 +++++++++++++++++++ > .../bootstrap/en/includes/holds-table.inc | 18 ++--- > .../bootstrap/en/modules/opac-user.tt | 55 +++++++------- > 3 files changed, 110 insertions(+), 34 deletions(-) > >diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml >index 8b4eb1f8ef7..6ac3c768ce3 100644 >--- a/admin/columns_settings.yml >+++ b/admin/columns_settings.yml >@@ -2519,6 +2519,77 @@ modules: > - > columnname: link > >+ patron_details: >+ checkoutst: >+ columns: >+ - >+ columnname: title >+ - >+ columnname: author >+ - >+ columnname: datedue >+ - >+ columnname: itemtype >+ - >+ columnname: barcode >+ - >+ columnname: callnumber >+ - >+ columnname: renew >+ - >+ columnname: fines >+ - >+ columnname: links >+ holdst: >+ columns: >+ - >+ columnname: title >+ - >+ columnname: placed_on >+ - >+ columnname: expires_on >+ - >+ columnname: pickup_location >+ - >+ columnname: priority >+ - >+ columnname: notes >+ - >+ columnname: suspend >+ - >+ columnname: modify >+ overduest: >+ columns: >+ - >+ columnname: title >+ - >+ columnname: itemtype >+ - >+ columnname: barcode >+ - >+ columnname: callnumber >+ - >+ columnname: checkoutdate >+ - >+ columnname: duedate >+ - >+ columnname: renew >+ - >+ columnname: fines >+ >+ opac_user_relative_issues_table: >+ columns: >+ - >+ columnname: title >+ - >+ columnname: duedate >+ - >+ columnname: barcode >+ - >+ columnname: callnumber >+ - >+ columnname: relative >+ > serials: > claims: > claimst: >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc >index 1bafd09778d..e6b5cdc49cc 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc >@@ -9,28 +9,28 @@ > <!-- HOLDS TABLE ROWS --> > <thead> > <tr> >- <th class="all anti-the">Title</th> >+ <th data-colname="title" class="all anti-the">Title</th> > [% IF ( showpriority ) %] >- <th>Placed on</th> >+ <th data-colname="placed_on">Placed on</th> > [% ELSE %] >- <th class="psort">Placed on</th> >+ <th data-colname="placed_on" class="psort">Placed on</th> > [% END %] >- <th>Expires on</th> >+ <th data-colname="expires_on">Expires on</th> > [% UNLESS( singleBranchMode) %] >- <th>Pickup location</th> >+ <th data-colname="pickup_location">Pickup location</th> > [% END %] > [% IF ( showpriority ) %] >- <th class="psort">Priority</th> >+ <th data-colname="priority" class="psort">Priority</th> > [% END %] > [% IF Koha.Preference('OpacHoldNotes') %] >- <th>Notes</th> >+ <th data-colname="notes">Notes</th> > [% END %] > <th>Status</th> > [% IF SuspendHoldsOpac and ! onlyinfo %] >- <th class="nosort">Suspend</th> >+ <th data-colname="suspend" class="nosort" >Suspend</th> > [% END %] > [% IF ! onlyinfo %] >- <th class="nosort">Modify</th> >+ <th data-colname="modify" class="nosort">Modify</th> > [% END %] > <th></th> > </tr> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >index 5c8edacfe22..ab33a46a139 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -2,6 +2,7 @@ > [% USE Asset %] > [% USE Koha %] > [% USE KohaDates %] >+[% USE TablesSettings %] > [% USE Branches %] > [% USE I18N %] > [% USE ItemTypes %] >@@ -309,29 +310,29 @@ > <thead> > <tr> > [% IF ( JacketImages ) %]<th class="no-sort"> </th>[% END %] >- <th class="all anti-the">Title</th> >- <th>Author</th> >- <th>Checked out on</th> >- <th class="psort">Due</th> >+ <th id="title" data-colname="title" class="all anti-the">Title</th> >+ <th id="author" data-colname="author">Author</th> >+ <th id="checkoutdate" data-colname="checkoutdate" class="psort">Checked out on</th> >+ <th id="duedate" data-colname="datedue" class="psort">Due</th> > [% IF ( Koha.Preference('BiblioItemtypeInfo') || !item_level_itypes ) %] >- <th>Item type</th> >+ <th data-colname="itemtype">Item type</th> > [% END %] > [% IF ( show_barcode ) %] >- <th>Barcode</th> >+ <th data-colname="barcode">Barcode</th> > [% END %] >- <th>Call number</th> >+ <th data-colname="callnumber">Call number</th> > [% IF ( OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions_contains('renew') ) ) %] >- <th>Renew</th> >+ <th data-colname="renew">Renew</th> > [% END %] > [% IF ( OPACFinesTab ) %] >- <th>Fines</th> >+ <th data-colname="fines">Fines</th> > [% END %] > [% IF Koha.Preference('OPACMySummaryHTML') %] >- <th class="no-sort">Links</th> >+ <th class="no-sort" data-colname="links">Links</th> > [% END %] > [% IF ( Koha.Preference('AllowCheckoutNotes') ) %] > <th class="hidden">Checkout note</th> >- <th id="checkout-notes" class="no-sort no-export" title="Use this to report any problems with your currently checked out items">Report a problem</th> >+ <th id="checkout-notes" class="no-sort no-export" title="Use this to report any problems with your currently checked out items" data-colname="note">Report a problem</th> > [% END %] > <th class="dtr-control-col"></th> > </tr> >@@ -650,11 +651,11 @@ > <caption class="sr-only">Relatives' checkouts</caption> > <thead> > <tr> >- <th class="all anti-the">Title</th> >- <th>Due</th> >- <th>Barcode</th> >- <th>Call number</th> >- <th class="psort">Relative</th> >+ <th data-colname="title" class="all anti-the">Title</th> >+ <th data-colname="duedate">Due</th> >+ <th data-colname="barcode">Barcode</th> >+ <th data-colname="callnumber">Call number</th> >+ <th data-colname="relative" class="psort">Relative</th> > <th class="dtr-control-col"></th> > </tr> > </thead> >@@ -692,17 +693,17 @@ > <thead> > <tr> > [% IF ( JacketImages ) %]<th class="no-sort"> </th>[% END %] >- <th class="all anti-the">Title</th> >- [% UNLESS ( item_level_itypes ) %]<th>Item type</th>[% END %] >- [% IF ( show_barcode ) %]<th>Barcode</th>[% END %] >- <th>Call number</th> >- <th>Checked out on</th> >- <th class="psort">Due</th> >+ <th data-colname="title" class="all anti-the">Title</th> >+ [% UNLESS ( item_level_itypes ) %]<th data-colname="itemtype">Item type</th> [% END %] >+ [% IF ( show_barcode ) %]<th data-colname="barcode">Barcode</th>[% END %] >+ <th data-colname="callnumber">Call number</th> >+ <th data-colname="checkoutdate">Checked out on</th> >+ <th data-colname="duedate" class="psort">Due</th> > [% IF ( OpacRenewalAllowed ) %] >- <th class="no-sort">Renew</th> >+ <th data-colname="renew" class="no-sort">Renew</th> > [% END %] > [% IF ( OPACFinesTab ) %] >- <th>Fines</th> >+ <th data-colname="fines">Fines</th> > [% END %] > <th class="dtr-control-col"></th> > </tr> >@@ -1175,6 +1176,10 @@ > ); > }); > >+ var tables_settings = new Map(); >+ [% FOREACH table IN ['checkoutst', 'holdst', 'overduest','opac_user_relative_issues_table'] %] >+ tables_settings.set("[% table | $raw %]", [% TablesSettings.GetTableSettings( 'opac', 'patron_details', table, 'json') | $raw %]); >+ [% END %] > var dTables = $("#checkoutst,#holdst,#overduest,#opac-user-relative-issues-table"); > dTables.each(function(){ > var thIndex = $(this).find("th.psort").index(); >@@ -1216,7 +1221,7 @@ > } > } > ] >- }); >+ }, tables_settings.get($(this).attr('id'))); > }); > > var dataTables = $("#recalls-table,#article-requests-table"); >-- >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 30221
:
172214
|
172451
|
172452
|
172453
|
172454
|
172455
|
172456
|
172581
|
172610
|
172611
|
172613
|
172615
|
172616
|
172618
|
172620
|
174014
|
174015
|
174016
|
174046
|
174047
|
174048
| 192154 |
192155
|
192156
|
192157
|
192158
|
192159
|
192160
|
193361