From 522873ac3a7071c86fb243f4cebee0a8108e9d20 Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Thu, 26 Oct 2017 11:41:34 -0400 Subject: [PATCH] Bug 11976: Add Publication date to subscription table (opac) + column settings This patch adds the column settings feature to the subscription list at the OPAC. It also adds a new column (Publication date) to this table Using Home->Administration->Column Settings->OPAC->subscriptionst the fields visibility can be toggled. TEST PLAN --------- 1) Have a subscription where you have received at least once. 2) Look for it in OPAC and note the date is the received date, not the publication date 3) Apply patch 4) Log in to staff client 5) Home->Administration->Column Settings->OPAC->subscriptionst 6) Set visibility as desired. 7) Refresh OPAC page -- everything should be as expected. 8) run koha qa test tools. Signed-off-by: David Bourgault Signed-off-by: Alex Arnaud Signed-off-by: Jonathan Druart Signed-off-by: Nick Clemens --- admin/columns_settings.yml | 11 ++++++ .../bootstrap/en/modules/opac-detail.tt | 35 ++++++++++++++----- 2 files changed, 37 insertions(+), 9 deletions(-) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index 951a564c7f..61fa864b38 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -481,3 +481,14 @@ modules: - columnname: item_coursereserves + subscriptionst: + - + columnname: serial_serialseq + - + columnname: serial_publisheddate + - + columnname: serial_planneddate + - + columnname: serial_status + - + columnname: serial_notes diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt index c4a697502a..5b0063c02e 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -844,18 +844,23 @@ [% END %] [% IF ( subscription.latestserials ) %]

The [% subscription.opacdisplaycount %] latest issues for this subscription:

- +
+ - - - - + + + + + + + [% FOREACH latestserial IN subscription.latestserials %] - - - + + + - + [% END # / FOREACH latestserials %] +
Issue #DateStatusNoteIssue #Publication dateReceived dateStatusNote
[% latestserial.serialseq %][% latestserial.planneddate %] + [% latestserial.serialseq %][% latestserial.publisheddate %][% latestserial.planneddate %] [% IF (latestserial.status1 ) %]Expected[% END %] [% IF (latestserial.status2 ) %]Arrived[% END %] [% IF (latestserial.status3 ) %]Late[% END %] @@ -869,9 +874,10 @@ [% IF (latestserial.status7 ) %]Claimed[% END %] [% IF (latestserial.status8 ) %]Stopped[% END %] [% latestserial.notes %][% latestserial.notes %]
[% END # / IF subscription.latestserials %] [% END # / FOREACH subscriptions %] @@ -1464,6 +1470,17 @@ "bKohaColumnsUseNames": true }, columns_settings); + var serial_column_settings = [% ColumnsSettings.GetColumns( 'opac', 'biblio-detail', 'subscriptionst', 'json' ) %]; + + KohaTable("#subscriptionst", { + dom: 'B<"clearfix">t', + "columnDefs": [ + { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, + { "sType": "title-string", "aTargets" : [ "title-string" ] } + ], + "bKohaColumnsUseNames": true + }, serial_column_settings); + [% IF ( TagsInputEnabled && loggedinusername ) %] $(".tag_add").click(function(){ var thisid = $(this).attr("id"); -- 2.39.5