Bugzilla – Attachment 38122 Details for
Bug 9254
New option to block patrons from changing messaging preferences in OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9254: Problem with EnhancedMessagingPreferences
Bug-9254-Problem-with-EnhancedMessagingPreferences.patch (text/plain), 5.17 KB, created by
Mark Tompsett
on 2015-04-18 21:38:49 UTC
(
hide
)
Description:
Bug 9254: Problem with EnhancedMessagingPreferences
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2015-04-18 21:38:49 UTC
Size:
5.17 KB
patch
obsolete
>From 47309dea26ea00d7b2a5397ced6e27ad4a7b9eb5 Mon Sep 17 00:00:00 2001 >From: Vitor FERNANDES <vfernandes@keep.pt> >Date: Sat, 18 Apr 2015 17:22:09 -0400 >Subject: [PATCH] Bug 9254: Problem with EnhancedMessagingPreferences > >First I don't know the right component to this bug. > >The problem is the following: > >- when enabling EnhancedMessagingPreferences, the staff client if able to set the messaging preferences for the patrons categories, and then for the patron (normally the messaging preferences are the same for everyone) >- when enabling EnhancedMessagingPreferences, the patrons can set in the OPAC their messaging preferences, which can be against the library rules > >Solution: > >- enabling EnhancedMessagingPreferences, should allow the the staff client to set the patrons messaging preferences >- enabling EnhancedMessagingPreferences, should't allow patrons to set their messaging preferences (the link doesn't appear in the usermenu.inc) >- should be another preference to allow the patrons to set their messaging preferences. > >Test plan: > >- apply the patch >- enable EnhancedMessagingPreferences, the messaging page should appear in OPAC >- disable OPACEnhancedMessagingPreferences, the messaging page shouldn't appear in OPAC >- disable EnhancedMessagingPreferences, the messaging page shouldn't appear in OPAC > >Sponsored-by: KEEP SOLUTIONS > >NOTE: Re-worked by Mark Tompsett, that's why I removed sign-offs. >--- > ...-9254-Add-OPACEnhancedMessagingPreferences-system-preference.sql | 6 ++++++ > installer/data/mysql/sysprefs.sql | 1 + > .../intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref | 6 ++++++ > koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc | 2 +- > 4 files changed, 14 insertions(+), 1 deletion(-) > create mode 100644 installer/data/mysql/atomicupdate/Bug-9254-Add-OPACEnhancedMessagingPreferences-system-preference.sql > >diff --git a/installer/data/mysql/atomicupdate/Bug-9254-Add-OPACEnhancedMessagingPreferences-system-preference.sql b/installer/data/mysql/atomicupdate/Bug-9254-Add-OPACEnhancedMessagingPreferences-system-preference.sql >new file mode 100644 >index 0000000..f1c946e >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/Bug-9254-Add-OPACEnhancedMessagingPreferences-system-preference.sql >@@ -0,0 +1,6 @@ >+INSERT INTO systempreferences >+ (variable,value,explanation,options,type) >+VALUES >+ ('OPACEnhancedMessagingPreferences',1, >+ 'Show the patrons messaging preferences page in the OPAC', >+ NULL, 'YesNo'); >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index be44611..a4a43cf 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -253,6 +253,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('OPACdefaultSortOrder','dsc','asc|dsc|za|az','Specify the default sort order','Choice'), > ('OPACdidyoumean',NULL,NULL,'Did you mean? configuration for the OPAC. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','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'), >+('OPACEnhancedMessagingPreferences',1, 'Show the patrons messaging preferences page in the OPAC', NULL, 'YesNo'), > ('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'), > ('OpacFavicon','','','Enter a complete URL to an image to replace the default Koha favicon on the OPAC','free'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >index 4784f27..3edf233 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >@@ -56,6 +56,12 @@ Patrons: > no: "Don't allow" > - patrons to choose which notices they receive and when they receive them. Note that this only applies to certain kinds of notices. > - >+ - pref: OPACEnhancedMessagingPreferences >+ choices: >+ yes: Allow >+ no: "Don't allow" >+ - patrons to choose which notices they receive and when they receive them in the OPAC. Note that this only works if EnhancedMessagingPreferences is active. >+ - > - pref: ExtendedPatronAttributes > choices: > yes: Enable >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc >index 182543b..0c9d149 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc >@@ -78,7 +78,7 @@ > [% END %] > [% END %] > >- [% IF ( EnhancedMessagingPreferences ) %] >+ [% IF ( EnhancedMessagingPreferences && Koha.Preferences('OPACEnhancedMessagingPreferences') ) %] > [% IF ( messagingview ) %] > <li class="active"> > [% ELSE %] >-- >1.9.1
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 9254
:
14199
|
14244
|
14246
|
15010
|
15011
|
15764
|
15765
|
20332
|
38122
|
38123
|
38124
|
38513
|
38514
|
38515
|
38516
|
38517