Bugzilla – Attachment 34670 Details for
Bug 8007
Discharge management
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8007: Discharge - Glue
Bug-8007-Discharge---Glue.patch (text/plain), 10.32 KB, created by
Jonathan Druart
on 2014-12-24 11:06:40 UTC
(
hide
)
Description:
Bug 8007: Discharge - Glue
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-12-24 11:06:40 UTC
Size:
10.32 KB
patch
obsolete
>From 37bb57cec91be21a409c788dd97fcb39d346127b Mon Sep 17 00:00:00 2001 >From: Yohann Dufour <dufour.yohann@gmail.com> >Date: Mon, 4 Aug 2014 16:09:35 +0200 >Subject: [PATCH] Bug 8007: Discharge - Glue > >This patch adds: >- links to the new pages. >- syspref description >- links on the main page (intranet) >- the DISCHARGE type for debarment >--- > C4/Auth.pm | 2 ++ > Koha/Borrower/Debarments.pm | 2 +- > .../intranet-tmpl/prog/en/includes/borrower_debarments.inc | 2 ++ > koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc | 3 +++ > koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt | 3 +++ > koha-tmpl/intranet-tmpl/prog/en/includes/members-menu.inc | 3 +++ > .../prog/en/modules/admin/preferences/patrons.pref | 6 ++++++ > koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt | 11 ++++++++++- > koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc | 9 +++++++++ > mainpage.pl | 3 +++ > 10 files changed, 42 insertions(+), 2 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index ae99fe9..df87aa6 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -404,6 +404,7 @@ sub get_template_and_user { > EnableBorrowerFiles => C4::Context->preference('EnableBorrowerFiles'), > UseKohaPlugins => C4::Context->preference('UseKohaPlugins'), > UseCourseReserves => C4::Context->preference("UseCourseReserves"), >+ useDischarge => C4::Context->preference('useDischarge'), > ); > } > else { >@@ -512,6 +513,7 @@ sub get_template_and_user { > OPACLocalCoverImages => C4::Context->preference("OPACLocalCoverImages"), > PatronSelfRegistration => C4::Context->preference("PatronSelfRegistration"), > PatronSelfRegistrationDefaultCategory => C4::Context->preference("PatronSelfRegistrationDefaultCategory"), >+ useDischarge => C4::Context->preference('useDischarge'), > ); > > $template->param(OpacPublic => '1') if ($user || C4::Context->preference("OpacPublic")); >diff --git a/Koha/Borrower/Debarments.pm b/Koha/Borrower/Debarments.pm >index 2c91af2..9efdc42 100644 >--- a/Koha/Borrower/Debarments.pm >+++ b/Koha/Borrower/Debarments.pm >@@ -131,7 +131,7 @@ sub DelDebarment { > my $success = ModDebarment({ > borrower_debarment_id => $borrower_debarment_id, > expiration => $expiration, >- type => $type, ## enum('FINES','OVERDUES','MANUAL') >+ type => $type, ## enum('FINES','OVERDUES','MANUAL','DISCHARGE') > comment => $comment, > }); > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc >index 8d6ac33..aea0889 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc >@@ -47,6 +47,8 @@ > Overdues > [% CASE 'SUSPENSION' %] > Suspension >+ [% CASE 'DISCHARGE' %] >+ Discharge > [% END %] > </td> > <td>[% d.comment %]</td> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >index 2fe0a68..d074963 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >@@ -84,6 +84,9 @@ > [% IF ( borrower_files ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/files.pl?borrowernumber=[% borrowernumber %]">Files</a></li> > [% END %] > [% IF ( suggestionsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/purchase-suggestions.pl?borrowernumber=[% borrowernumber %]">Purchase suggestions</a></li> >+ [% IF CAN_user_borrowers && useDischarge %] >+ [% IF dischargeview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/discharge.pl?borrowernumber=[% borrowernumber %]">Discharge</a></li> >+ [% END %] > </ul></div> > [% END %] > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt >index aead23b..64abad7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt >@@ -83,6 +83,9 @@ in the global namespace %] > [% IF ( borrower_files ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/files.pl?borrowernumber=[% borrower.borrowernumber %]">Files</a></li> > [% END %] > [% IF ( suggestionsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/purchase-suggestions.pl?borrowernumber=[% borrower.borrowernumber %]">Purchase<br/>suggestions</a></li> >+ [% IF CAN_user_borrowers && useDischarge %] >+ [% IF dischargeview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/discharge.pl?borrowernumber=[% borrowernumber %]">Discharge</a></li> >+ [% END %] > </ul></div> > [% END %] > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/members-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/members-menu.inc >index 9bd5285..e7e8772 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/members-menu.inc >@@ -19,6 +19,9 @@ > [% IF EnableBorrowerFiles %] > [% IF ( borrower_files ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/files.pl?borrowernumber=[% borrowernumber %]">Files</a></li> > [% END %] >+ [% IF CAN_user_borrowers && useDischarge %] >+ [% IF dischargeview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/discharge.pl?borrowernumber=[% borrowernumber %]">Discharge</a></li> >+ [% END %] > </ul> > </div> > [% END %] >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 aa567c3..6f6776a 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 >@@ -139,6 +139,12 @@ Patrons: > - pref: CardnumberLength > - "characters long. The length can be a single number to specify an exact length, a range separated by a comma (i.e., 'Min,Max'), or a maximum with no minimum (i.e., ',Max')." > - "If 'cardnumber' is included in the BorrowerMandatoryField list, the minimum length, if not specified here, defaults to one." >+ - >+ - pref: useDischarge >+ choices: >+ yes: Allows >+ no: "Don't allow" >+ - librarians to discharge borrowers and borrowers to request a discharge. > "Norwegian patron database": > - > - pref: NorwegianPatronDBEnable >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >index c34ca85..8440526 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >@@ -111,7 +111,9 @@ > [% IF ( ( CAN_user_tools_moderate_comments && pendingcomments ) > || ( CAN_user_tools_moderate_tags && pendingtags ) > || ( CAN_user_borrowers && pending_borrower_modifications ) >- || ( CAN_user_acquisition && pendingsuggestions ) ) %] >+ || ( CAN_user_acquisition && pendingsuggestions ) >+ || ( CAN_user_borrowers && pending_discharge_requests ) >+ ) %] > <div id="area-pending"> > [% IF ( CAN_user_acquisition && pendingsuggestions ) %] > <div class="pending-info" id="suggestions_pending"> >@@ -143,6 +145,13 @@ > </div> > [% END %] > >+ [% IF CAN_user_borrowers && pending_discharge_requests %] >+ <div class="pending-info" id="patron_discharges_pending"> >+ <a href="/cgi-bin/koha/members/discharges.pl">Discharge requests pending</a>: >+ <span class="pending-number-link">[% pending_discharge_requests %]</span> >+ </div> >+ [% END %] >+ > </div> > > [% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc >index 182543b..2c896fa 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc >@@ -95,6 +95,15 @@ > [% END %] > <a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves">your lists</a></li> > [% END %] >+ >+ [% IF Koha.Preference( 'useDischarge' ) == 1 %] >+ [% IF ( dischargeview ) %] >+ <li class="active"> >+ [% ELSE %] >+ <li> >+ [% END %] >+ <a href="/cgi-bin/koha/opac-discharge.pl">ask for a discharge</a></li> >+ [% END %] > </ul> > </div> > [% END %] >diff --git a/mainpage.pl b/mainpage.pl >index 09450f6..1ccffad 100755 >--- a/mainpage.pl >+++ b/mainpage.pl >@@ -29,6 +29,7 @@ use C4::Review qw/numberofreviews/; > use C4::Suggestions qw/CountSuggestion/; > use C4::Tags qw/get_count_by_tag_status/; > use Koha::Borrower::Modifications; >+use Koha::Borrower::Discharge; > > my $query = new CGI; > >@@ -65,12 +66,14 @@ my $pendingtags = get_count_by_tag_status(0); > my $pendingsuggestions = CountSuggestion("ASKED"); > my $pending_borrower_modifications = > Koha::Borrower::Modifications->GetPendingModificationsCount( $branch ); >+my $pending_discharge_requests = Koha::Borrower::Discharge::count({ pending => 1 }); > > $template->param( > pendingcomments => $pendingcomments, > pendingtags => $pendingtags, > pendingsuggestions => $pendingsuggestions, > pending_borrower_modifications => $pending_borrower_modifications, >+ pending_discharge_requests => $pending_discharge_requests, > ); > > # >-- >2.1.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 8007
:
14490
|
16622
|
16935
|
17484
|
17485
|
21394
|
21395
|
21396
|
21660
|
21674
|
21675
|
21676
|
21677
|
21678
|
24023
|
24024
|
24025
|
24026
|
24027
|
30531
|
30532
|
30533
|
30534
|
30535
|
31007
|
34034
|
34035
|
34036
|
34037
|
34038
|
34039
|
34668
|
34669
|
34670
|
34671
|
34672
|
34673
|
34674
|
34675
|
36180
|
36181
|
36182
|
36183
|
36184
|
36185
|
36186
|
36187
|
36394
|
36395
|
36396
|
36397
|
36398
|
36399
|
36400
|
36401
|
37029
|
37030
|
37031
|
37032
|
37033
|
37034
|
37035
|
37036
|
37037
|
38596
|
38597