Bugzilla – Attachment 68192 Details for
Bug 11976
Add column settings + new column "Publication date" to the subscription table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11976 - Choose date to display
Bug-11976---Choose-date-to-display.patch (text/plain), 6.46 KB, created by
David Bourgault
on 2017-10-16 18:45:01 UTC
(
hide
)
Description:
Bug 11976 - Choose date to display
Filename:
MIME Type:
Creator:
David Bourgault
Created:
2017-10-16 18:45:01 UTC
Size:
6.46 KB
patch
obsolete
>From b61b8c4d1c402f65872d79915ae76c7c3dc7554f Mon Sep 17 00:00:00 2001 >From: David Bourgault <david.bourgault@inlibro.com> >Date: Mon, 25 Sep 2017 14:03:04 -0400 >Subject: [PATCH] Bug 11976 - Choose date to display > >Allows choosing between publication date or receival date (or both) for serials information in the OPAC. > >Test plan : >0) If you have no serials : > a) Create a subscription > b) Receive the item, making sure to have a different publication and receival date >1) Visit the OPAC details page for the item you've created >2) Without the patch only the receival date will be displayed >3) Apply patch >4) Run installer/data/mysql/updatedatabase.pl >5) With the patch the publication date and the receival date will be displayed. This can be changed to either (or both) with the 'OPACSerialDisplayPublishedDate' system preference. >--- > .../mysql/atomicupdate/Bug11976-DisplayPublishedDate.sql | 1 + > installer/data/mysql/sysprefs.sql | 1 + > .../prog/en/modules/admin/preferences/serials.pref | 8 ++++++++ > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 14 ++++++++++++-- > 4 files changed, 22 insertions(+), 2 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/Bug11976-DisplayPublishedDate.sql > >diff --git a/installer/data/mysql/atomicupdate/Bug11976-DisplayPublishedDate.sql b/installer/data/mysql/atomicupdate/Bug11976-DisplayPublishedDate.sql >new file mode 100644 >index 0000000..fff212e >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/Bug11976-DisplayPublishedDate.sql >@@ -0,0 +1 @@ >+INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('OPACSerialDisplayPublishedDate', 'both', 'publication|receival|both', 'Which date should be displayed in the OPAC page of a serial', 'Choice'); >\ No newline at end of file >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 1cb1ae1..afdca30 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -376,6 +376,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('OpacSeparateHoldings','0',NULL,'Separate current branch holdings from other holdings (OPAC)','YesNo'), > ('OpacSeparateHoldingsBranch','homebranch','homebranch|holdingbranch','Branch used to separate holdings (OPAC)','Choice'), > ('opacSerialDefaultTab','subscriptions','holdings|serialcollection|subscriptions','Define the default tab for serials in OPAC.','Choice'), >+('OPACSerialDisplayPublishedDate', 'both', 'publication|receival|both', 'Which date should be displayed in the OPAC page of a serial', 'Choice'), > ('OPACSerialIssueDisplayCount','3','','Number of serial issues to display per subscription in the OPAC','Integer'), > ('OPACShelfBrowser','1','','Enable/disable Shelf Browser on item details page. WARNING: this feature is very resource consuming on collections with large numbers of items.','YesNo'), > ('OPACShowBarcode','0','','Show items barcode in holding tab','YesNo'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref >index 76c89a8..c9c23a4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref >@@ -8,6 +8,14 @@ Serials: > serialcollection: Serial Collection tab > - as default tab for serials in OPAC. Please note that the Serial Collection tab is currently available only for UNIMARC. > - >+ - Display the >+ - pref: OPACSerialDisplayPublishedDate >+ choices: >+ publication: "publication date" >+ receival: "receival date" >+ both: "publication and receival dates" >+ - in the OPAC details tab for serials. >+ - > - pref: RenewSerialAddsSuggestion > choices: > yes: Add >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 f450d0e..28485ca 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -846,14 +846,24 @@ > <table class="table table-bordered table-striped"> > <tr> > <th>Issue #</th> >- <th>Date</th> >+ [% IF Koha.Preference( 'OPACSerialDisplayPublishedDate' ) == 'publication' || Koha.Preference( 'OPACSerialDisplayPublishedDate' ) == 'both' %] >+ <th>Publication date</th> >+ [% END %] >+ [% IF Koha.Preference( 'OPACSerialDisplayPublishedDate' ) == 'receival' || Koha.Preference( 'OPACSerialDisplayPublishedDate' ) == 'both' %] >+ <th>Receival date</th> >+ [% END %] > <th>Status</th> > <th>Note</th> > </tr> > [% FOREACH latestserial IN subscription.latestserials %] > <tr> > <td>[% latestserial.serialseq %]</td> >- <td>[% latestserial.planneddate %]</td> >+ [% IF Koha.Preference( 'OPACSerialDisplayPublishedDate' ) == 'publication' || Koha.Preference( 'OPACSerialDisplayPublishedDate' ) == 'both' %] >+ <td>[% latestserial.publisheddate %]</td> >+ [% END %] >+ [% IF Koha.Preference( 'OPACSerialDisplayPublishedDate' ) == 'receival' || Koha.Preference( 'OPACSerialDisplayPublishedDate' ) == 'both' %] >+ <td>[% latestserial.planneddate %]</td> >+ [% END %] > <td> > [% IF (latestserial.status1 ) %]<span>Expected</span>[% END %] > [% IF (latestserial.status2 ) %]<span>Arrived</span>[% END %] >-- >2.7.4
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 11976
:
26490
|
26491
|
67347
|
67615
|
67964
|
68192
|
68610
|
68611
|
68630
|
68632
|
69003
|
69988
|
70060