Bugzilla – Attachment 51000 Details for
Bug 12528
Enable staff to deny message setting access to patrons on the OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12528 - Enable staff to deny message setting access to patrons on the OPAC
Bug-12528---Enable-staff-to-deny-message-setting-a.patch (text/plain), 7.21 KB, created by
Jonathan Druart
on 2016-04-29 14:53:14 UTC
(
hide
)
Description:
Bug 12528 - Enable staff to deny message setting access to patrons on the OPAC
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-04-29 14:53:14 UTC
Size:
7.21 KB
patch
obsolete
>From 9bb21c3abd17ef659c0c1db59de94f3e6525bc67 Mon Sep 17 00:00:00 2001 >From: Bouzid Fergani <bouzid.fergani@inlibro.com> >Date: Mon, 2 Nov 2015 16:45:45 -0500 >Subject: [PATCH] Bug 12528 - Enable staff to deny message setting access to > patrons on the OPAC > > - Change the preference Enhancedmessagingpreference description. > - Enable default EnhancedMessagingPreferences and OPACEnhancedMessagingPreferences. > - not sent e-mail it's necessary, when user call opac-messaging.pl directly.. > >Testing: > >I Apply the patch >II Run updatedatabase.pl > >0) Search OPACEnhancedMessagingPreferences preference; >1) Validate "OPACEnhancedMessagingPreferences show patron messaging > setting on the OPAC (NOTE: EnhancedMessagingPreferences must be > enabled)."; > >2) Disable OPACEnhancedMessagingPreferences preference; >3) Enable EnhancedMessagingPreferences preference; >4) On the OPAC -> user's settings, validate "your messaging" is not > showed. > >Signed-off-by: Frederic Demians <f.demians@tamil.fr> > Works as expected. With the new syspref, patrons can be forbidden to > modify themselves their own messaging preferences. > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> > >Also, I like sysprefs >http://www.quickmeme.com/img/d9/d99723bc544e8d33572dc92f242a6f6e2dbe0126a2e35fe3de073d30d62002e6.jpg > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > installer/data/mysql/atomicupdate/sysprefs_Bug12528.sql | 4 ++++ > installer/data/mysql/sysprefs.sql | 1 + > .../prog/en/modules/admin/preferences/patrons.pref | 9 ++++++++- > koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc | 14 ++++++++------ > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt | 6 +++++- > 5 files changed, 26 insertions(+), 8 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/sysprefs_Bug12528.sql > >diff --git a/installer/data/mysql/atomicupdate/sysprefs_Bug12528.sql b/installer/data/mysql/atomicupdate/sysprefs_Bug12528.sql >new file mode 100644 >index 0000000..b711e47 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/sysprefs_Bug12528.sql >@@ -0,0 +1,4 @@ >+INSERT INTO systempreferences ( variable, value, options, explanation,type ) VALUES >+('OPACEnhancedMessagingPreferences', '1', NULL, 'If ON, show patrons messaging setting on the OPAC.', 'YesNo') ON DUPLICATE KEY UPDATE value ='1'; >+INSERT INTO systempreferences ( variable, value, options, explanation,type ) VALUES >+('EnhancedMessagingPreferences', '1', NULL, 'If ON, allows patrons to select to receive additional messages about items due or nearly due.', 'YesNo') ON DUPLICATE KEY UPDATE value ='1'; >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 277fc1d..eb0c39c 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -291,6 +291,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('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'), > ('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', NULL, 'If ON, show patrons messaging setting on the OPAC.', '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 b4b2a1c..e5f8ec4 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 >@@ -54,7 +54,7 @@ Patrons: > choices: > yes: Allow > 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. >+ - "Staff to manage which notices patrons will receive and when they will receive them. Note: this only applies to courtesy notices. To manage if patrons have also access to these settings, use OPACEnhancedMessagingPreferences." > - > - pref: ExtendedPatronAttributes > choices: >@@ -159,6 +159,13 @@ Patrons: > yes: Do > no: "Don't" > - charge a fee when a patron changes to a category with an enrollment fee. >+ - >+ - pref: OPACEnhancedMessagingPreferences >+ choices: >+ yes: Show >+ no: "Don't show" >+ - "patron messaging setting on the OPAC (NOTE: EnhancedMessagingPreferences must be enabled)." >+ > "Norwegian patron database": > - > - pref: NorwegianPatronDBEnable >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc >index d166b6e..a8b0a5e 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc >@@ -77,12 +77,14 @@ > [% END %] > > [% IF ( EnhancedMessagingPreferences ) %] >- [% IF ( messagingview ) %] >- <li class="active"> >- [% ELSE %] >- <li> >- [% END %] >- <a href="/cgi-bin/koha/opac-messaging.pl">your messaging</a></li> >+ [% IF Koha.Preference( 'OPACEnhancedMessagingPreferences' ) %] >+ [% IF ( messagingview ) %] >+ <li class="active"> >+ [% ELSE %] >+ <li> >+ [% END %] >+ <a href="/cgi-bin/koha/opac-messaging.pl">your messaging</a></li> >+ [% END %] > [% END %] > > [% IF Koha.Preference( 'virtualshelves' ) == 1 %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >index d1d30fa..1fc8d99 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >@@ -22,6 +22,7 @@ > </div> > </div> > <div class="span10"> >+ [% IF Koha.Preference( 'OPACEnhancedMessagingPreferences' ) %] > <div id="usermessaging"> > <h3>Your messaging settings</h3> > [% IF ( settings_updated ) %] >@@ -150,7 +151,10 @@ > </fieldset> > </form> > </div> <!-- / #usermessaging --> >- </div> <!-- / .span10 --> >+ [% ELSE %] >+ <h4>You are not allowed to call this page directly</h4> >+ [% END %] >+ </div> <!-- / .span10 --> > </div> <!-- / .row-fluid --> > </div> <!-- / .container-fluid --> > </div> <!-- / .main --> >-- >2.7.0
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 12528
:
29505
|
30259
|
30348
|
30349
|
30487
|
31047
|
36511
|
36512
|
36513
|
36818
|
44302
|
44820
|
44826
|
45885
|
45886
|
45962
|
46003
|
46015
|
46082
|
46156
|
46217
|
46218
|
50649
|
50650
|
50651
|
50652
|
50988
|
50989
| 51000 |
51001
|
51002
|
51003
|
51004