From f5f3e31a17e29251673b23404056c1ad3d51704d Mon Sep 17 00:00:00 2001 From: Arthur Suzuki 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 --- admin/columns_settings.yml | 69 ++++++++++++ .../en/includes/columns_settings.inc | 2 +- .../bootstrap/en/includes/holds-table.inc | 18 +-- .../bootstrap/en/modules/opac-user.tt | 106 +++++++----------- 4 files changed, 120 insertions(+), 75 deletions(-) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index 82548ed2c5..5a03b787e4 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -2116,6 +2116,75 @@ 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: duedate + - + columnname: renew + - + columnname: fines + + opac_user_relative_issues_table: + columns: + - + columnname: title + - + columnname: duedate + - + columnname: barcode + - + columnname: callnumber + - + columnname: relative + serials: subscription-detail: orders: diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/columns_settings.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/columns_settings.inc index 6fe51008c3..17b7bb041e 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/columns_settings.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/columns_settings.inc @@ -87,7 +87,7 @@ function KohaTable(selector, dt_parameters, columns_settings) { columns: included_ids, className: "columns_controls", titleAttr: _("Columns settings"), - text: ' ' + _("Columns") + '', + text: '' + _("Columns") + '', exportOptions: { columns: exportColumns } 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 a92c77b540..f59138c086 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc @@ -8,28 +8,28 @@ - Title + Title [% IF ( showpriority ) %] - Placed on + Placed on [% ELSE %] - Placed on + Placed on [% END %] - Expires on + Expires on [% UNLESS( singleBranchMode) %] - Pickup location + Pickup location [% END %] [% IF ( showpriority ) %] - Priority + Priority [% END %] [% IF Koha.Preference('OpacHoldNotes') %] - Notes + Notes [% END %] Status [% IF SuspendHoldsOpac and ! onlyinfo %] - Suspend + Suspend [% END %] [% IF ! onlyinfo %] - Modify + Modify [% END %] 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 89e2b1dd0a..5f842d3146 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 ItemTypes %] [% USE Price %] @@ -332,28 +333,28 @@ [% IF ( JacketImages ) %] [% END %] - Title - Author - Due + Title + Author + Due [% IF ( Koha.Preference('BiblioItemtypeInfo') || !item_level_itypes ) %] - Item type + Item type [% END %] [% IF ( show_barcode ) %] - Barcode + Barcode [% END %] - Call number + Call number [% IF ( OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions_contains('renew') ) ) %] - Renew + Renew [% END %] [% IF ( OPACFinesTab ) %] - Fines + Fines [% END %] [% IF Koha.Preference('OPACMySummaryHTML') %] - Links + Links [% END %] [% IF ( Koha.Preference('AllowCheckoutNotes') ) %] Checkout note - Report a problem + Report a problem [% END %] @@ -665,15 +666,15 @@ [% IF relatives %] [% WRAPPER tab_panel tabname="opac-user-relative-issues" %] - +
- - - - - + + + + + @@ -720,16 +721,16 @@ [% IF ( JacketImages ) %][% END %] - - [% UNLESS ( item_level_itypes ) %] [% END %] - [% IF ( show_barcode ) %][% END %] - - + + [% UNLESS ( item_level_itypes ) %] [% END %] + [% IF ( show_barcode ) %][% END %] + + [% IF ( OpacRenewalAllowed ) %] - + [% END %] [% IF ( OPACFinesTab ) %] - + [% END %] @@ -1090,6 +1091,7 @@ [% Asset.js("js/form-submit.js") | $raw %] [% INCLUDE 'calendar.inc' %] [% INCLUDE 'datatables.inc' %] + [% INCLUDE 'columns_settings.inc' %]
Relatives' checkouts
TitleDueBarcodeCall numberRelativeTitleDueBarcodeCall numberRelative
 TitleItem typeBarcodeCall numberDueTitleItem typeBarcodeCall numberDueRenewRenewFinesFines