From d9b2c4f31b48206100b6773ea4a53215dec9344f Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Tue, 13 Jun 2017 04:18:43 +0000 Subject: [PATCH] Bug 8628: [FOLLOW-UP] More fixes This patch fixes qa tool issues, problems in comment 13, merge conflicts, other issues with patches Same test plan applies --- .../bug_8628-digital-signs-sysprefs.sql | 7 +++-- installer/data/mysql/kohastructure.sql | 6 ++-- installer/data/mysql/sysprefs.sql | 5 ++++ .../intranet-tmpl/prog/en/includes/permissions.inc | 1 + .../intranet-tmpl/prog/en/modules/tools/signs.tt | 23 +++++++++------ .../opac-tmpl/bootstrap/en/modules/opac-signs.tt | 20 ++++++------- opac/opac-signs.pl | 4 +-- tools/signs.pl | 34 ++++++++++++++++------ 8 files changed, 64 insertions(+), 36 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_8628-digital-signs-sysprefs.sql b/installer/data/mysql/atomicupdate/bug_8628-digital-signs-sysprefs.sql index 8aff962..d2a08f5 100644 --- a/installer/data/mysql/atomicupdate/bug_8628-digital-signs-sysprefs.sql +++ b/installer/data/mysql/atomicupdate/bug_8628-digital-signs-sysprefs.sql @@ -1,3 +1,4 @@ -INSERT IGNORE INTO systempreferences (variable,value,explanation,type) VALUES ('OPACDigitalSigns',0,'Turn digital signs in the OPAC on or off.','YesNo'); -INSERT IGNORE INTO systempreferences (variable,explanation,type) VALUES ('OPACDigitalSignsCSS','Extra CSS to be included in all signs','Textarea'); -INSERT IGNORE INTO systempreferences (variable,value,explanation,type) VALUES ('OPACDigitalSignsSwatches','abcde','List the swatches that can be chosen when creating a new sign','free'); +INSERT IGNORE INTO systempreferences (`variable`,`value`,`options`,`explanation`,`type`) VALUES +('OPACDigitalSigns',0,NULL,'Turn digital signs in the OPAC on or off.','YesNo'), +('OPACDigitalSignsCSS','',NULL,'Extra CSS to be included in all signs','Textarea'), +('OPACDigitalSignsSwatches','abcde',NULL,'List the swatches that can be chosen when creating a new sign','free'); diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index ebe2478..69d46e0 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -4111,7 +4111,7 @@ CREATE TABLE sign_streams ( `name` varchar(64), -- name/title of the sign PRIMARY KEY (`sign_stream_id`), CONSTRAINT `sign_streams_ibfk_1` FOREIGN KEY (`saved_sql_id`) REFERENCES `saved_sql` (`id`) ON DELETE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Table structure for table 'signs' @@ -4128,7 +4128,7 @@ CREATE TABLE signs ( `pagedelay` int(11) NOT NULL default 0, -- seconds to wait before turning to a new page/record `reloadafter` int(11) NOT NULL default 0, -- seconds to wait before reloading all the pages PRIMARY KEY (`sign_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Table structure for table 'signs_to_streams' @@ -4143,7 +4143,7 @@ CREATE TABLE signs_to_streams ( PRIMARY KEY (`sign_to_stream_id`), CONSTRAINT `signs_to_streams_ibfk_1` FOREIGN KEY (`sign_stream_id`) REFERENCES `sign_streams` (`sign_stream_id`) ON DELETE CASCADE, CONSTRAINT `signs_to_streams_ibfk_2` FOREIGN KEY (`sign_id`) REFERENCES `signs` (`sign_id`) ON DELETE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index e820d62..584e46e 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -82,6 +82,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('BatchCheckoutsValidCategories','',NULL,'Patron categories allowed to checkout in a batch','Free'), ('BiblioAddsAuthorities','0',NULL,'If ON, adding a new biblio will check for an existing authority record and create one on the fly if one doesn\'t exist','YesNo'), ('BiblioDefaultView','normal','normal|marc|isbd','Choose the default detail view in the catalog; choose between normal, marc or isbd','Choice'), +('BibtexExportAdditionalFields', '', NULL, 'Define additional BibTex tags to export from MARC records in YAML format as an associative array with either a marc tag/subfield combination as the value, or a list of tag/subfield combinations.', 'textarea'), ('BlockExpiredPatronOpacActions','1',NULL,'Set whether an expired patron can perform opac actions such as placing holds or renew books, can be overridden on a per patron-type basis','YesNo'), ('BlockReturnOfWithdrawnItems','1','0','If enabled, items that are marked as withdrawn cannot be returned.','YesNo'), ('BorrowerMandatoryField','surname|cardnumber',NULL,'Choose the mandatory fields for a patron\'s account','free'), @@ -320,6 +321,9 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('OPACdefaultSortField','relevance','relevance|popularity|call_number|pubdate|acqdate|title|author','Specify the default field used for sorting','Choice'), ('OPACdefaultSortOrder','dsc','asc|dsc|za|az','Specify the default sort order','Choice'), ('OPACdidyoumean','',NULL,'Did you mean? configuration for the OPAC. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','Free'), +('OPACDigitalSigns',0,NULL, 'Turn digital signs in the OPAC on or off.','YesNo'), +('OPACDigitalSignsCSS','',NULL,'Extra CSS to be included in all signs','Textarea'), +('OPACDigitalSignsSwatches','abcde',NULL,'List the swatches that can be chosen when creating a new sign','free'), ('OPACDisplay856uAsImage','OFF','OFF|Details|Results|Both','Display the URI in the 856u field as an image, the corresponding OPACXSLT option must be on','Choice'), ('OpacExportOptions','bibtex,dc,marcxml,marc8,utf8,marcstd,mods,ris,isbd','','Define export options available on OPAC detail page.','multiple'), ('OPACFallback', 'prog', 'bootstrap|prog', 'Define the fallback theme for the OPAC interface.', 'Themes'), @@ -459,6 +463,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('ReturnpathDefault','',NULL,'Use this email address as return path or bounce address for undeliverable emails','Free'), ('ReturnToShelvingCart','0','','If set, when any item is \'checked in\', it\'s location code will be changed to CART.','YesNo'), ('reviewson','1','','If ON, enables patron reviews of bibliographic records in the OPAC','YesNo'), +('RisExportAdditionalFields', '', NULL, 'Define additional RIS tags to export from MARC records in YAML format as an associative array with either a marc tag/subfield combination as the value, or a list of tag/subfield combinations.', 'textarea'), ('RoutingListAddReserves','1','','If ON the patrons on routing lists are automatically added to holds on the issue.','YesNo'), ('RoutingListNote','To change this note edit RoutingListNote system preference.','70|10','Define a note to be shown on all routing lists','Textarea'), ('RoutingSerials','1',NULL,'If ON, serials routing is enabled','YesNo'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc index 7c6275a..70c58f5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc @@ -107,5 +107,6 @@ [%- CASE 'edit_clubs' -%]Create and edit clubs [%- CASE 'edit_templates' -%]Create and edit club templates [%- CASE 'enroll' -%]Enroll patrons in clubs + [%- CASE 'edit_digital_signs' -%]Create and edit digital signs for the OPAC [%- END -%] [%- END -%] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/signs.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/signs.tt index b9bec0c..ed683ff 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/signs.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/signs.tt @@ -6,7 +6,6 @@ [% INCLUDE 'datatables.inc' %]