Bugzilla – Attachment 67964 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 - Display either or both publication date and receival date
Bug-11976---Display-either-or-both-publication-dat.patch (text/plain), 7.22 KB, created by
David Bourgault
on 2017-10-11 15:32:43 UTC
(
hide
)
Description:
Bug 11976 - Display either or both publication date and receival date
Filename:
MIME Type:
Creator:
David Bourgault
Created:
2017-10-11 15:32:43 UTC
Size:
7.22 KB
patch
obsolete
>From 00b9fca0b12dd464bad0932c25b36e21b2e21a78 Mon Sep 17 00:00:00 2001 >From: David Bourgault <david.bourgault@inlibro.com> >Date: Wed, 11 Oct 2017 09:30:39 -0400 >Subject: [PATCH] Bug 11976 - Display either or both publication date and > receival date > >This changes the behavior of the patch. The systempreference now allows choosing to display either date, or both (in two separate columns). >--- > .../mysql/atomicupdate/Bug11976-DisplayPublishedDate.sql | 3 ++- > installer/data/mysql/kohastructure.sql | 3 +++ > installer/data/mysql/sysprefs.sql | 2 +- > .../prog/en/modules/admin/preferences/serials.pref | 5 +++-- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 12 +++++++++--- > 5 files changed, 18 insertions(+), 7 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/Bug11976-DisplayPublishedDate.sql b/installer/data/mysql/atomicupdate/Bug11976-DisplayPublishedDate.sql >index ae36c37..f4aaf2c 100644 >--- a/installer/data/mysql/atomicupdate/Bug11976-DisplayPublishedDate.sql >+++ b/installer/data/mysql/atomicupdate/Bug11976-DisplayPublishedDate.sql >@@ -1 +1,2 @@ >-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 >+DELETE FROM systempreferences WHERE variable='OPACSerialDisplayPublishedDate'; >+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/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index eb02c95..7b1c920 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -3922,6 +3922,7 @@ CREATE TABLE IF NOT EXISTS `housebound_role` ( > -- Table structure for table 'article_requests' > -- > >+DROP TABLE IF EXISTS `article_requests`; > CREATE TABLE `article_requests` ( > `id` int(11) NOT NULL AUTO_INCREMENT, > `borrowernumber` int(11) NOT NULL, >@@ -3955,6 +3956,7 @@ CREATE TABLE `article_requests` ( > -- Table structure for table `biblio_metadata` > -- > >+DROP TABLE IF EXISTS `biblio_metadata`; > CREATE TABLE biblio_metadata ( > `id` INT(11) NOT NULL AUTO_INCREMENT, > `biblionumber` INT(11) NOT NULL, >@@ -3970,6 +3972,7 @@ CREATE TABLE biblio_metadata ( > -- Table structure for table `deletedbiblio_metadata` > -- > >+DROP TABLE IF EXISTS `deletedbiblio_metadata`; > CREATE TABLE deletedbiblio_metadata ( > `id` INT(11) NOT NULL AUTO_INCREMENT, > `biblionumber` INT(11) NOT NULL, >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index c341646..bcf0122 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -376,7 +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', 1, NULL, 'Wether to display the publication date (yes) or the received date (no)', 'YesNo'), >+('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 f94a513..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 >@@ -11,8 +11,9 @@ Serials: > - Display the > - pref: OPACSerialDisplayPublishedDate > choices: >- yes: "publication date" >- no: "receival date" >+ publication: "publication date" >+ receival: "receival date" >+ both: "publication and receival dates" > - in the OPAC details tab for serials. > - > - pref: RenewSerialAddsSuggestion >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 2e0ecbb..8ed2214 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -846,16 +846,22 @@ > <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> >- [% IF Koha.Preference( 'OPACSerialDisplayPublishedDate' ) %] >+ [% IF Koha.Preference( 'OPACSerialDisplayPublishedDate' ) == 'publication' || Koha.Preference( 'OPACSerialDisplayPublishedDate' ) == 'both' %] > <td>[% latestserial.publisheddate %]</td> >- [% ELSE %] >+ [% END %] >+ [% IF Koha.Preference( 'OPACSerialDisplayPublishedDate' ) == 'receival' || Koha.Preference( 'OPACSerialDisplayPublishedDate' ) == 'both' %] > <td>[% latestserial.planneddate %]</td> > [% END %] > <td> >-- >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