Bugzilla – Attachment 29288 Details for
Bug 9303
relative's checkouts in the opac
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9303 [5] [QA Followup 2]
Bug-9303-5-QA-Followup-2.patch (text/plain), 12.76 KB, created by
Kyle M Hall (khall)
on 2014-06-26 17:03:49 UTC
(
hide
)
Description:
Bug 9303 [5] [QA Followup 2]
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-06-26 17:03:49 UTC
Size:
12.76 KB
patch
obsolete
>From 7364d3e9da82b855d1c9cd40848660951fcd4529 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 26 Jun 2014 12:34:36 -0400 >Subject: [PATCH] Bug 9303 [5] [QA Followup 2] > >* Hides the ability to set visibility of checkouts if patron has no guarantor >* Hides the setting on "your personal details" if OPACPrivacy is enabled >* Adds the name of the guarantor near the setting on both opac pages >* Changes "Call No." to "Call number". There is pleny of space for the > real word, so why not use it? >--- > Koha/Schema/Result/Borrower.pm | 6 +++- > Koha/Template/Plugin/Koha.pm | 15 +++++++++ > installer/data/mysql/sysprefs.sql | 2 +- > installer/data/mysql/updatedatabase.pl | 2 +- > .../prog/en/modules/admin/preferences/opac.pref | 2 +- > .../bootstrap/en/modules/opac-memberentry.tt | 10 ++++-- > .../opac-tmpl/bootstrap/en/modules/opac-privacy.tt | 32 ++++++++++++-------- > .../opac-tmpl/bootstrap/en/modules/opac-user.tt | 6 ++-- > 8 files changed, 52 insertions(+), 23 deletions(-) > >diff --git a/Koha/Schema/Result/Borrower.pm b/Koha/Schema/Result/Borrower.pm >index 3915ed7..6a3fb10 100644 >--- a/Koha/Schema/Result/Borrower.pm >+++ b/Koha/Schema/Result/Borrower.pm >@@ -1021,6 +1021,10 @@ __PACKAGE__->has_many( > # Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-11-07 08:15:21 > # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:TQTGI0fDt+xCFs+8nOarfA > >+__PACKAGE__->belongs_to( >+ "guarantor", >+ "Koha::Schema::Result::Borrower", >+ { borrowernumber => "guarantorid" }, >+); > >-# You can replace this text with custom content, and it will be preserved on regeneration > 1; >diff --git a/Koha/Template/Plugin/Koha.pm b/Koha/Template/Plugin/Koha.pm >index 2eff9f1..e5f3374 100644 >--- a/Koha/Template/Plugin/Koha.pm >+++ b/Koha/Template/Plugin/Koha.pm >@@ -22,6 +22,7 @@ use Modern::Perl; > use base qw( Template::Plugin ); > > use C4::Context; >+use Koha::Database; > > =pod > >@@ -44,4 +45,18 @@ sub Preference { > return C4::Context->preference( $pref ); > } > >+sub Find { >+ my ( $self, $rs, $id ) = @_; >+ >+ return unless ( $rs && $id ); >+ >+ my $resultset = Koha::Database->new()->schema()->resultset($rs); >+ >+ return unless $resultset; >+ >+ my $row = $resultset->find($id); >+ >+ return $row; >+} >+ > 1; >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index e4b08e5..08871ab 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -25,7 +25,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('AllowNotForLoanOverride','0','','If ON, Koha will allow the librarian to loan a not for loan item.','YesNo'), > ('AllowOfflineCirculation','0','','If on, enables HTML5 offline circulation functionality.','YesNo'), > ('AllowOnShelfHolds','0','','Allow hold requests to be placed on items that are not on loan','YesNo'), >-('AllowPatronToSetRelativesCheckoutsVisibility', '0', NULL, 'If enabled, the patron can set checkouts to be visible to guarantor from opac-memberentry.pl', 'YesNo'), >+('AllowPatronToSetRelativesCheckoutsVisibility', '0', NULL, 'If enabled, the patron can set checkouts to be visible to his or her guarantor', 'YesNo'), > ('AllowPKIAuth','None','None|Common Name|emailAddress','Use the field from a client-side SSL certificate to look a user in the Koha database','Choice'), > ('AllowPurchaseSuggestionBranchChoice','0','1','Allow user to choose branch when making a purchase suggestion','YesNo'), > ('AllowRenewalLimitOverride','0',NULL,'if ON, allows renewal limits to be overridden on the circulation screen','YesNo'), >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 468e6a9..8eee821 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -8615,7 +8615,7 @@ if(CheckVersion($DBversion)) { > INSERT INTO systempreferences (variable, value, options, explanation, type ) > VALUES ( > 'AllowPatronToSetRelativesCheckoutsVisibility', '0', NULL, >- 'If enabled, the patron can set checkouts to be visible to guarantor from opac-memberentry.pl', 'YesNo' >+ 'If enabled, the patron can set checkouts to be visible to his or her guarantor', 'YesNo' > ) > }); > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >index bb26bcb..973d4fd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >@@ -593,7 +593,7 @@ OPAC: > choices: > yes: Allow > no: "Don't allow" >- - patrons to choose their own privacy settings for showing checkouts to relatives from "your personal details" reguardless of the setting for OPACPrivacy. >+ - patrons to choose their own privacy settings for showing the patron's checkouts to the patron's guarantor". > - > - Use borrowernumber > - pref: AnonymousPatron >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >index c3b29cc..9051f28 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >@@ -54,12 +54,12 @@ > <div class="alert">You typed in the wrong characters in the box before submitting. Please try again.</div> > [% END %] > >- [% IF Koha.Preference('AllowPatronToSetRelativesCheckoutsVisibility') %] >+ [% IF borrower.guarantorid && !Koha.Preference('OPACPrivacy') && Koha.Preference('AllowPatronToSetRelativesCheckoutsVisibility') %] > <fieldset class="rows" id="memberentry_privacy"> > <legend id="privacy_legend">Privacy</legend> > <ol> > <li> >- <label>Allow relatives to view your current checkouts?</label> >+ <label>Allow your guarantor to view your current checkouts?</label> > <select id="privacy_relative_checkouts"> > <option value="0">No</option> > [% IF borrower.privacy_relative_checkouts %] >@@ -72,6 +72,10 @@ > <a id="update_privacy_relative_checkouts" href="#" class="btn">Update</a> > <span id="update_privacy_relative_checkouts_message" class="alert" style="display:none"></span> > </span> >+ <span class="hint"> >+ [% SET g = Koha.Find('Borrower',borrower.guarantorid) %] >+ Your guarantor is <i>[% g.firstname %] [% g.surname %]</i> >+ </span> > </li> > </ol> > </fieldset> >@@ -801,7 +805,7 @@ > $( "#borrower_dateofbirth" ).datepicker({ yearRange: "c-120:c" }); > [% END %] > >- [% IF Koha.Preference('AllowPatronToSetRelativesCheckoutsVisibility') %] >+ [% IF borrower.guarantorid && !Koha.Preference('OPACPrivacy') && Koha.Preference('AllowPatronToSetRelativesCheckoutsVisibility') %] > $('#update_privacy_relative_checkouts').click( function() { > $.post( "/cgi-bin/koha/svc/patron/show_checkouts_to_relatives", { privacy_relative_checkouts: $('#privacy_relative_checkouts').val() }) > .done(function( data ) { >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt >index 7c894d5..a624c12 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt >@@ -68,20 +68,26 @@ > </select> > </div> > >- <div> >- <label for="privacy_relative_checkouts">Allow relatives to view your current checkouts?</label> >- <select name="privacy_relative_checkouts"> >- [% IF borrower.privacy_relative_checkouts %] >- <option value="0">No</option> >- <option value="1" selected>Yes</option> >- [% ELSE %] >- <option value="0" selected>No</option> >- <option value="1">Yes</option> >- [% END %] >- </select> >- </div> >+ [% SET b = Koha.Find('Borrower', borrower.borrowernumber) %] >+ [% IF b.guarantorid && Koha.Preference('AllowPatronToSetRelativesCheckoutsVisibility') %] >+ <div> >+ <label for="privacy_relative_checkouts">Allow your guarantor to view your current checkouts?</label> >+ <select name="privacy_relative_checkouts"> >+ [% IF borrower.privacy_relative_checkouts %] >+ <option value="0">No</option> >+ <option value="1" selected>Yes</option> >+ [% ELSE %] >+ <option value="0" selected>No</option> >+ <option value="1">Yes</option> >+ [% END %] >+ </select> >+ <span class="hint"> >+ Your guarantor is <i>[% b.guarantor.firstname %] [% b.guarantor.surname %]</i> >+ </span> >+ </div> > >- <button type="Submit" class="btn">Save</button> >+ <button type="Submit" class="btn">Save</button> >+ [% END %] > </fieldset> > </form> > <h2>Immediate deletion</h2> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >index 126d404..ab82bb0 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -134,7 +134,7 @@ > [% IF ( show_barcode ) %] > <th>Barcode</th> > [% END %] >- <th>Call No.</th> >+ <th>Call number</th> > [% IF ( OpacRenewalAllowed && !( borrower.is_expired && borrower.BlockExpiredPatronOpacActions ) ) %] > <th class="nosort">Renew</th> > [% END %] >@@ -371,7 +371,7 @@ > <th class="anti-the">Title</th> > <th>Due</th> > <th>Barcode</th> >- <th>Call No.</th> >+ <th>Call number</th> > <th class="psort">Relative</th> > </tr> > </thead> >@@ -420,7 +420,7 @@ > <th class="anti-the">Title</th> > [% UNLESS ( item_level_itypes ) %]<th>Item type</th> [% END %] > [% IF ( show_barcode ) %]<th>Barcode</th>[% END %] >- <th>Call no.</th> >+ <th>Call number</th> > <th class="title-string psort">Due</th> > [% IF ( OpacRenewalAllowed ) %] > <th class="nosort">Renew</th> >-- >1.7.2.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 9303
:
22757
|
22770
|
22771
|
22772
|
22783
|
22789
|
22790
|
22809
|
22966
|
22967
|
22968
|
22974
|
22975
|
23086
|
23087
|
23088
|
23089
|
23090
|
23525
|
23526
|
23527
|
24009
|
24010
|
24011
|
24773
|
24774
|
24775
|
24776
|
25008
|
25584
|
25585
|
25586
|
27537
|
27538
|
27539
|
27540
|
27541
|
27542
|
27543
|
27698
|
27699
|
28153
|
28154
|
28155
|
28156
|
28157
|
28158
|
28159
|
28160
|
28161
|
28912
|
29171
|
29172
|
29215
|
29286
|
29287
|
29288
|
29289
|
29290
|
29299
|
29302
|
29303
|
29304
|
29932
|
29933
|
29934
|
29935
|
29936
|
29937
|
30287
|
30288
|
30289
|
30297
|
30298
|
30299
|
30300
|
32053
|
32054
|
32055
|
33049
|
34629
|
34630
|
34631
|
34632
|
34633
|
35519
|
35520
|
35521
|
35522
|
35523
|
35524
|
35525
|
35526
|
35527
|
35528
|
35529
|
35530
|
35531
|
35532
|
35678
|
35679
|
35680
|
35681
|
35682
|
35683
|
35684
|
35686
|
35687
|
35688
|
35689
|
35690
|
35691
|
35832
|
36287
|
36288
|
36289
|
37110
|
37111
|
37112
|
38264
|
38265
|
38266
|
38267
|
38328
|
38329
|
38330
|
38331
|
38446
|
38447
|
38448
|
38449
|
38450
|
38820
|
38821
|
38822
|
38823
|
38824
|
39042
|
39043
|
39044
|
39045
|
39046
|
39047
|
39048
|
39811
|
39817
|
39818
|
39819
|
39820
|
39821
|
39822
|
39823
|
44430
|
44431
|
44432
|
44433
|
44434
|
44435
|
44436
|
44511
|
44512
|
44513
|
44514
|
44515
|
44516
|
44517
|
46136
|
46137
|
46138
|
46139
|
46140
|
46141
|
46142