Bugzilla – Attachment 62815 Details for
Bug 12461
Add patron clubs feature
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12461 - (QA Followup)
Bug-12461---QA-Followup.patch (text/plain), 4.24 KB, created by
Nick Clemens (kidclamp)
on 2017-04-28 10:48:14 UTC
(
hide
)
Description:
Bug 12461 - (QA Followup)
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2017-04-28 10:48:14 UTC
Size:
4.24 KB
patch
obsolete
>From ad7094e8521d7299a7cbe3bd8505e47b37ac98aa Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 28 Apr 2017 06:43:44 -0400 >Subject: [PATCH] Bug 12461 - (QA Followup) > > Club enrollments should only list active enrollments > Confirms should warn of cascading delete > Branch limited clubs should only be available to members of that > branch > Fix breadcrumbs >--- > Koha/Club.pm | 2 +- > Koha/Clubs.pm | 5 ++++- > clubs/club-enrollments.pl | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/clubs/club-enrollments.tt | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt | 4 ++-- > 5 files changed, 9 insertions(+), 6 deletions(-) > >diff --git a/Koha/Club.pm b/Koha/Club.pm >index 0d93f8c..f55bfb5 100644 >--- a/Koha/Club.pm >+++ b/Koha/Club.pm >@@ -72,7 +72,7 @@ sub club_enrollments { > > return unless $self->id(); > >- return scalar Koha::Club::Enrollments->search( { club_id => $self->id() } ); >+ return scalar Koha::Club::Enrollments->search( { club_id => $self->id(), date_canceled => undef } ); > } > > =head3 club_fields >diff --git a/Koha/Clubs.pm b/Koha/Clubs.pm >index a553314..7d62d22 100644 >--- a/Koha/Clubs.pm >+++ b/Koha/Clubs.pm >@@ -57,7 +57,10 @@ sub get_enrollable { > } > > # Only clubs with no end date or an end date in the future can be enrolled in >- $params->{'-or'} = [ date_end => { '>=' => \'CURRENT_DATE()' }, date_end => undef ]; >+ $params->{'-and'} = [ >+ -or => [ date_end => { '>=' => \'CURRENT_DATE()' }, date_end => undef], >+ -or => [ 'me.branchcode' => $borrower->branchcode, 'me.branchcode' => undef ] >+ ]; > > my $rs = $self->_resultset()->search( $params, { prefetch => 'club_template' } ); > >diff --git a/clubs/club-enrollments.pl b/clubs/club-enrollments.pl >index e3cd12d..01ef24d 100755 >--- a/clubs/club-enrollments.pl >+++ b/clubs/club-enrollments.pl >@@ -38,7 +38,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > ); > > my $id = $cgi->param('id'); >-my $club = Koha::Clubs->find($id); >+my $club = Koha::Clubs->find( $id ); > > $template->param( > club => $club, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/club-enrollments.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/club-enrollments.tt >index 72af5b8..738b05f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/club-enrollments.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/club-enrollments.tt >@@ -27,7 +27,7 @@ > <body id="club_enrollments" class="clubs"> > [% INCLUDE 'header.inc' %] > [% INCLUDE 'cat-search.inc' %] >-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › Patron clubs › Club enrollments</div> >+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › <a href="clubs.pl">Patron clubs</a> › Club enrollments</div> > > <div id="doc3" class="yui-t2"> > <div id="bd"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt >index 14fded1..3727423 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt >@@ -29,7 +29,7 @@ > }); > > function ConfirmDeleteTemplate( id, name, a ) { >- if ( confirm( _("Are you sure you want to delete the club template %s?" ).format(name) ) ) { >+ if ( confirm( _("Are you sure you want to delete the club template %s? This will delete all clubs using this template and cancel patron enrollments" ).format(name) ) ) { > $.ajax({ > type: "POST", > url: '/cgi-bin/koha/svc/club/template/delete', >@@ -47,7 +47,7 @@ > } > > function ConfirmDeleteClub( id, name, a ) { >- if ( confirm( _("Are you sure you want to delete the club %s?" ).format(name) ) ) { >+ if ( confirm( _("Are you sure you want to delete the club %s? This will cancel all patron enrollments in this club." ).format(name) ) ) { > $.ajax({ > type: "POST", > url: '/cgi-bin/koha/svc/club/delete', >-- >2.1.4
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 12461
:
29105
|
30456
|
31567
|
35104
|
36098
|
36099
|
36192
|
38748
|
39181
|
43428
|
47821
|
47824
|
47825
|
47856
|
49110
|
49121
|
50422
|
50423
|
50426
|
50427
|
58818
|
58819
|
58820
|
59272
|
59273
|
60519
|
60520
|
60521
|
60610
|
60611
|
60612
|
60613
|
60614
|
60615
|
60616
|
60617
|
60618
|
60624
|
62778
|
62779
|
62813
|
62814
| 62815