Bugzilla – Attachment 67347 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 - Show publication date instead of received date
Bug-11976---Show-publication-date-instead-of-recei.patch (text/plain), 5.06 KB, created by
David Bourgault
on 2017-09-25 18:04:04 UTC
(
hide
)
Description:
Bug 11976 - Show publication date instead of received date
Filename:
MIME Type:
Creator:
David Bourgault
Created:
2017-09-25 18:04:04 UTC
Size:
5.06 KB
patch
obsolete
>From 06a73b5337b4b4cc5889c4b7cfe3b8925babd982 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 - Show publication date instead of received date > >Allows choosing between publication date or receival date 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 the receival date will be displayed >3) Apply patch >4) Run installer/data/mysql/updatedatabase.pl >5) With the patch the publication date will be displayed. This can be changed back with the 'OPACSerialDisplayPublishedDate' system preference. >--- > .../data/mysql/atomicupdate/Bug11976-DisplayPublishedDate.sql | 1 + > installer/data/mysql/sysprefs.sql | 1 + > .../intranet-tmpl/prog/en/modules/admin/preferences/serials.pref | 7 +++++++ > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 6 +++++- > 4 files changed, 14 insertions(+), 1 deletion(-) > 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..ae36c37 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/Bug11976-DisplayPublishedDate.sql >@@ -0,0 +1 @@ >+INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('OPACSerialDisplayPublishedDate', 1, NULL, 'Wether to display the publication date (yes) or the received date (no)', 'YesNo'); >\ No newline at end of file >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 5155fe7..407a2f0 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -375,6 +375,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', 1, NULL, 'Wether to display the publication date (yes) or the received date (no)', 'YesNo'), > ('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..f94a513 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,13 @@ 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: >+ yes: "publication date" >+ no: "receival date" >+ - 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 9d1f2b9..2e0ecbb 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -853,7 +853,11 @@ > [% FOREACH latestserial IN subscription.latestserials %] > <tr> > <td>[% latestserial.serialseq %]</td> >- <td>[% latestserial.planneddate %]</td> >+ [% IF Koha.Preference( 'OPACSerialDisplayPublishedDate' ) %] >+ <td>[% latestserial.publisheddate %]</td> >+ [% ELSE %] >+ <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