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>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Bouzid Fergani 2015-11-02 16:45:45 -05:00 committed by Kyle M Hall
parent 52d30fba7b
commit aa14476ebc
5 changed files with 26 additions and 8 deletions

View File

@ -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';

View File

@ -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'),

View File

@ -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

View File

@ -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 %]

View File

@ -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 -->