Bugzilla – Attachment 35413 Details for
Bug 5501
Improve the 'do not notify' option
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 5501 - Improve the 'do not notify' option
Bug-5501---Improve-the-do-not-notify-option.patch (text/plain), 8.84 KB, created by
Olli-Antti Kivilahti
on 2015-01-20 18:07:06 UTC
(
hide
)
Description:
Bug 5501 - Improve the 'do not notify' option
Filename:
MIME Type:
Creator:
Olli-Antti Kivilahti
Created:
2015-01-20 18:07:06 UTC
Size:
8.84 KB
patch
obsolete
>From 27c258cb7e26aaa3af385290bf2744850d85f27a Mon Sep 17 00:00:00 2001 >From: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> >Date: Tue, 20 Jan 2015 20:04:51 +0200 >Subject: [PATCH] Bug 5501 - Improve the 'do not notify' option > >Introducing the message_transport_type 'none' and enabling it for all messages. >Enabling print-option for "HOLD Fulfilled". >Print option can be added for other messages as well, but HOLD seems to make >the most sense. >--- > .../mysql/en/mandatory/message_transport_types.sql | 1 + > .../sample_notices_message_transports.sql | 16 ++++- > installer/data/mysql/updatedatabase.pl | 22 +++++++ > .../prog/en/includes/messaging-preference-form.inc | 69 +++++++++++++++++++- > 4 files changed, 102 insertions(+), 6 deletions(-) > >diff --git a/installer/data/mysql/en/mandatory/message_transport_types.sql b/installer/data/mysql/en/mandatory/message_transport_types.sql >index ed3c4ad..0c1c602 100644 >--- a/installer/data/mysql/en/mandatory/message_transport_types.sql >+++ b/installer/data/mysql/en/mandatory/message_transport_types.sql >@@ -4,4 +4,5 @@ values > ('email'), > ('print'), > ('sms'), >+('none'), > ('phone'); >diff --git a/installer/data/mysql/en/mandatory/sample_notices_message_transports.sql b/installer/data/mysql/en/mandatory/sample_notices_message_transports.sql >index ae68378..56328a4 100644 >--- a/installer/data/mysql/en/mandatory/sample_notices_message_transports.sql >+++ b/installer/data/mysql/en/mandatory/sample_notices_message_transports.sql >@@ -3,15 +3,25 @@ insert into `message_transports` > values > (1, 'email', 0, 'circulation', 'DUE'), > (1, 'email', 1, 'circulation', 'DUEDGST'), >-(2, 'email', 0, 'circulation', 'PREDUE'), >-(2, 'email', 1, 'circulation', 'PREDUEDGST'), >-(4, 'email', 0, 'reserves', 'HOLD'), > (1, 'sms', 0, 'circulation', 'DUE'), > (1, 'sms', 1, 'circulation', 'DUEDGST'), >+(1, 'none', 0, 'circulation', 'DUE'), >+(1, 'none', 1, 'circulation', 'DUEDGST'), >+(1, 'print', 0, 'circulation', 'DUE'), >+(1, 'print', 1, 'circulation', 'DUEDGST'), >+(2, 'email', 0, 'circulation', 'PREDUE'), >+(2, 'email', 1, 'circulation', 'PREDUEDGST'), > (2, 'sms', 0, 'circulation', 'PREDUE'), > (2, 'sms', 1, 'circulation', 'PREDUEDGST'), >+(2, 'none', 0, 'circulation', 'PREDUE'), >+(2, 'none', 1, 'circulation', 'PREDUEDGST'), >+(4, 'email', 0, 'reserves', 'HOLD'), > (4, 'sms', 0, 'reserves', 'HOLD'), >+(4, 'none', 0, 'reserves', 'HOLD'), >+(4, 'print', 0, 'reserves', 'HOLD'), > (5, 'email', 0, 'circulation', 'CHECKIN'), > (5, 'sms', 0, 'circulation', 'CHECKIN'), >+(5, 'none', 0, 'circulation', 'CHECKIN'), > (6, 'email', 0, 'circulation', 'CHECKOUT'), > (6, 'sms', 0, 'circulation', 'CHECKOUT'); >+(6, 'none', 0, 'circulation', 'CHECKOUT'); >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 4653c02..e4ee09b 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -6773,6 +6773,28 @@ if ( CheckVersion($DBversion) ) { > SetVersion ($DBversion); > } > >+$DBversion = "3.19.XXX"; >+if ( CheckVersion($DBversion) ) { >+ $dbh->do(q{ INSERT INTO message_transport_types VALUES ('none'); }); >+ $dbh->do(q{ >+ INSERT INTO `message_transports` >+ (`message_attribute_id`, `message_transport_type`, `is_digest`, `letter_module`, `letter_code`) >+ VALUES >+ (1, 'none', 0, 'circulation', 'DUE'), >+ (1, 'none', 1, 'circulation', 'DUEDGST'), >+ (1, 'print', 0, 'circulation', 'DUE'), >+ (1, 'print', 1, 'circulation', 'DUEDGST'), >+ (2, 'none', 0, 'circulation', 'PREDUE'), >+ (2, 'none', 1, 'circulation', 'PREDUEDGST'), >+ (4, 'none', 0, 'reserves', 'HOLD'), >+ (4, 'print', 0, 'reserves', 'HOLD'), >+ (5, 'none', 0, 'circulation', 'CHECKIN'), >+ (6, 'none', 0, 'circulation', 'CHECKOUT'); >+ }); >+ print "Upgrade to $DBversion done (Bug 5501 - Improve the 'do not notify' option)\n"; >+ SetVersion ($DBversion); >+} >+ > $DBversion = "3.11.00.203"; > if ( CheckVersion($DBversion) ) { > $dbh->do(q{ALTER TABLE suggestions CHANGE COLUMN title title VARCHAR(255) DEFAULT NULL;}); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc >index 3b7bb50..142691d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc >@@ -7,6 +7,7 @@ > newid = Number(rowid.replace("none","")) > $("#sms"+newid).removeAttr("checked"); > $("#email"+newid).removeAttr("checked"); >+ $("#print"+newid).removeAttr("checked"); > $("#phone"+newid).removeAttr("checked"); > $("#digest"+newid).removeAttr("checked"); > $("#rss"+newid).removeAttr("checked"); >@@ -23,9 +24,10 @@ > <th>Days in advance</th> > [% IF ( SMSSendDriver ) %]<th>SMS</th>[% END %] > [% IF ( TalkingTechItivaPhone ) %]<th>Phone</th>[% END %] >+ <th>Print</th> > <th>Email</th><th>Digests only?</th> > <!-- <th>RSS</th> --> >- [% UNLESS ( messaging_form_inactive ) %]<th>Do not notify</th>[% END %] >+ <th>Do not notify</th> > </tr> > [% FOREACH messaging_preference IN messaging_preferences %] > <tr> >@@ -110,6 +112,38 @@ > [% END %] > </td>[% END %] > >+ [% IF ( messaging_preference.transport_print ) %] >+ <td> >+ [% IF ( messaging_form_inactive ) %] >+ [% IF ( messaging_preference.transports_print ) %] >+ <input type="checkbox" >+ id="print[% messaging_preference.message_attribute_id %]" >+ name="[% messaging_preference.message_attribute_id %]" >+ value="print" checked="checked" disabled="disabled" /> >+ [% ELSE %] >+ <input type="checkbox" >+ id="print[% messaging_preference.message_attribute_id %]" >+ name="[% messaging_preference.message_attribute_id %]" >+ value="print" disabled="disabled" /> >+ [% END %] >+ [% ELSE %] >+ [% IF ( messaging_preference.transports_print ) %] >+ <input type="checkbox" >+ id="print[% messaging_preference.message_attribute_id %]" >+ name="[% messaging_preference.message_attribute_id %]" >+ value="print" checked="checked" onclick = "$('#none'+'[% messaging_preference.message_attribute_id %]').removeAttr('checked');" /> >+ [% ELSE %] >+ <input type="checkbox" >+ id="print[% messaging_preference.message_attribute_id %]" >+ name="[% messaging_preference.message_attribute_id %]" >+ value="print" onclick = "$('#none'+'[% messaging_preference.message_attribute_id %]').removeAttr('checked');" /> >+ [% END %] >+ [% END %] >+ </td> >+ [% ELSE %] >+ <td>-</td> >+ [% END %] >+ > [% IF ( messaging_preference.transport_email ) %] > <td> > [% IF ( messaging_form_inactive ) %] >@@ -192,9 +226,38 @@ > <td>-</td> > [% END %] --> > >- [% UNLESS ( messaging_form_inactive ) %] >- <td><input type="checkbox" class="none" id="none[% messaging_preference.message_attribute_id %]" /></td> >+ [% IF ( messaging_preference.transport_none ) %] >+ <td> >+ [% IF ( messaging_form_inactive ) %] >+ [% IF ( messaging_preference.transports_none ) %] >+ <input type="checkbox" class="none" >+ id="none[% messaging_preference.message_attribute_id %]" >+ name="[% messaging_preference.message_attribute_id %]" >+ value="none" checked="checked" disabled="disabled" /> >+ [% ELSE %] >+ <input type="checkbox" class="none" >+ id="none[% messaging_preference.message_attribute_id %]" >+ name="[% messaging_preference.message_attribute_id %]" >+ value="none" disabled="disabled" /> >+ [% END %] >+ [% ELSE %] >+ [% IF ( messaging_preference.transports_none ) %] >+ <input type="checkbox" class="none" >+ id="none[% messaging_preference.message_attribute_id %]" >+ name="[% messaging_preference.message_attribute_id %]" >+ value="none" checked="checked" /> >+ [% ELSE %] >+ <input type="checkbox" class="none" >+ id="none[% messaging_preference.message_attribute_id %]" >+ name="[% messaging_preference.message_attribute_id %]" >+ value="none" /> >+ [% END %] >+ [% END %] >+ </td> >+ [% ELSE %] >+ <td>-</td> > [% END %] >+ > </tr> > [% END %] > </table> >-- >1.7.9.5
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 5501
: 35413 |
35414
|
46566