View | Details | Raw Unified | Return to bug 8007
Collapse All | Expand All

(-)a/C4/Auth.pm (+2 lines)
Lines 363-368 sub get_template_and_user { Link Here
363
            EnableBorrowerFiles         => C4::Context->preference('EnableBorrowerFiles'),
363
            EnableBorrowerFiles         => C4::Context->preference('EnableBorrowerFiles'),
364
            UseKohaPlugins              => C4::Context->preference('UseKohaPlugins'),
364
            UseKohaPlugins              => C4::Context->preference('UseKohaPlugins'),
365
            UseCourseReserves            => C4::Context->preference("UseCourseReserves"),
365
            UseCourseReserves            => C4::Context->preference("UseCourseReserves"),
366
            useDischarge                => C4::Context->preference('useDischarge'),
366
        );
367
        );
367
    }
368
    }
368
    else {
369
    else {
Lines 468-473 sub get_template_and_user { Link Here
468
            OPACLocalCoverImages         => C4::Context->preference("OPACLocalCoverImages"),
469
            OPACLocalCoverImages         => C4::Context->preference("OPACLocalCoverImages"),
469
            PatronSelfRegistration       => C4::Context->preference("PatronSelfRegistration"),
470
            PatronSelfRegistration       => C4::Context->preference("PatronSelfRegistration"),
470
            PatronSelfRegistrationDefaultCategory => C4::Context->preference("PatronSelfRegistrationDefaultCategory"),
471
            PatronSelfRegistrationDefaultCategory => C4::Context->preference("PatronSelfRegistrationDefaultCategory"),
472
            useDischarge                 => C4::Context->preference('useDischarge'),
471
        );
473
        );
472
474
473
        $template->param(OpacPublic => '1') if ($user || C4::Context->preference("OpacPublic"));
475
        $template->param(OpacPublic => '1') if ($user || C4::Context->preference("OpacPublic"));
(-)a/Koha/Borrower/Debarments.pm (-1 / +1 lines)
Lines 131-137 sub DelDebarment { Link Here
131
my $success = ModDebarment({
131
my $success = ModDebarment({
132
    borrower_debarment_id => $borrower_debarment_id,
132
    borrower_debarment_id => $borrower_debarment_id,
133
    expiration            => $expiration,
133
    expiration            => $expiration,
134
    type                  => $type, ## enum('FINES','OVERDUES','MANUAL')
134
    type                  => $type, ## enum('FINES','OVERDUES','MANUAL','DISCHARGE')
135
    comment               => $comment,
135
    comment               => $comment,
136
});
136
});
137
137
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc (+2 lines)
Lines 47-52 Link Here
47
                                    Overdues
47
                                    Overdues
48
                                [% CASE 'SUSPENSION' %]
48
                                [% CASE 'SUSPENSION' %]
49
                                    Suspension
49
                                    Suspension
50
                                [% CASE 'DISCHARGE' %]
51
                                    Discharge
50
                            [% END %]
52
                            [% END %]
51
                        </td>
53
                        </td>
52
                        <td>[% d.comment %]</td>
54
                        <td>[% d.comment %]</td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc (+3 lines)
Lines 84-89 Link Here
84
        [% IF ( borrower_files ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/files.pl?borrowernumber=[% borrowernumber %]">Files</a></li>
84
        [% IF ( borrower_files ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/files.pl?borrowernumber=[% borrowernumber %]">Files</a></li>
85
    [% END %]
85
    [% END %]
86
    [% IF (  suggestions ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/purchase-suggestions.pl?borrowernumber=[% borrowernumber %]">Purchase<br/>suggestions</a></li>
86
    [% IF (  suggestions ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/purchase-suggestions.pl?borrowernumber=[% borrowernumber %]">Purchase<br/>suggestions</a></li>
87
    [% IF CAN_user_borrowers && useDischarge %]
88
        [% IF dischargeview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/discharge.pl?borrowernumber=[% borrowernumber %]">Discharge</a></li>
89
    [% END %]
87
</ul></div>
90
</ul></div>
88
[% END %]
91
[% END %]
89
92
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt (+3 lines)
Lines 82-87 in the global namespace %] Link Here
82
    [% IF EnableBorrowerFiles %]
82
    [% IF EnableBorrowerFiles %]
83
        [% IF ( borrower_files ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/files.pl?borrowernumber=[% borrower.borrowernumber %]">Files</a></li>
83
        [% IF ( borrower_files ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/files.pl?borrowernumber=[% borrower.borrowernumber %]">Files</a></li>
84
    [% END %]
84
    [% END %]
85
    [% IF CAN_user_borrowers && useDischarge %]
86
        [% IF dischargeview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/discharge.pl?borrowernumber=[% borrowernumber %]">Discharge</a></li>
87
    [% END %]
85
</ul></div>
88
</ul></div>
86
[% END %]
89
[% END %]
87
90
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/members-menu.inc (+3 lines)
Lines 19-24 Link Here
19
    [% IF EnableBorrowerFiles %]
19
    [% IF EnableBorrowerFiles %]
20
        [% IF ( borrower_files ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/files.pl?borrowernumber=[% borrowernumber %]">Files</a></li>
20
        [% IF ( borrower_files ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/files.pl?borrowernumber=[% borrowernumber %]">Files</a></li>
21
    [% END %]
21
    [% END %]
22
    [% IF CAN_user_borrowers && useDischarge %]
23
        [% IF dischargeview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/discharge.pl?borrowernumber=[% borrowernumber %]">Discharge</a></li>
24
    [% END %]
22
  </ul>
25
  </ul>
23
</div>
26
</div>
24
[% END %]
27
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref (+6 lines)
Lines 139-141 Patrons: Link Here
139
               yes: Do
139
               yes: Do
140
               no: "Don't"
140
               no: "Don't"
141
         - enable the ability to upload and attach arbitrary files to a borrower record.
141
         - enable the ability to upload and attach arbitrary files to a borrower record.
142
     -
143
         - pref: useDischarge
144
           choices:
145
               yes: Allows
146
               no: "Don't allow"
147
         - librarians to discharge borrowers and borrowers to request a discharge.
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt (-1 / +10 lines)
Lines 106-112 Link Here
106
            [% IF ( ( CAN_user_tools_moderate_comments  && pendingcomments ) 
106
            [% IF ( ( CAN_user_tools_moderate_comments  && pendingcomments ) 
107
                    || ( CAN_user_tools_moderate_tags && pendingtags )
107
                    || ( CAN_user_tools_moderate_tags && pendingtags )
108
                    || ( CAN_user_borrowers && pending_borrower_modifications )
108
                    || ( CAN_user_borrowers && pending_borrower_modifications )
109
                    || ( CAN_user_acquisition && pendingsuggestions ) ) %]
109
                    || ( CAN_user_acquisition && pendingsuggestions )
110
                    || ( CAN_user_borrowers && pending_discharge_requests )
111
            ) %]
110
                <div id="area-pending">
112
                <div id="area-pending">
111
                    [% IF ( CAN_user_acquisition && pendingsuggestions ) %]
113
                    [% IF ( CAN_user_acquisition && pendingsuggestions ) %]
112
                    <div class="pending-info" id="suggestions_pending">
114
                    <div class="pending-info" id="suggestions_pending">
Lines 138-143 Link Here
138
                    </div>
140
                    </div>
139
                    [% END %]
141
                    [% END %]
140
142
143
                    [% IF CAN_user_borrowers && pending_discharge_requests %]
144
                    <div class="pending-info" id="patron_discharges_pending">
145
                        <a href="/cgi-bin/koha/members/discharges.pl">Discharge requests pending</a>:
146
                        <span class="pending-number-link">[% pending_discharge_requests %]</span>
147
                    </div>
148
                    [% END %]
149
141
                </div>
150
                </div>
142
151
143
            [% END %]
152
            [% END %]
(-)a/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc (-1 / +3 lines)
Lines 32-38 Link Here
32
  [% IF ( virtualshelves ) %] 
32
  [% IF ( virtualshelves ) %] 
33
  [% IF ( listsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves">my lists</a></li>
33
  [% IF ( listsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves">my lists</a></li>
34
  [% END %]
34
  [% END %]
35
35
  [% IF useDischarge %]
36
    [% IF dischargeview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/opac-discharge.pl">ask for a discharge</a></li>
37
  [% END %]
36
</ul>
38
</ul>
37
</div>
39
</div>
38
[% END %][% ELSE %][% END %]
40
[% END %][% ELSE %][% END %]
(-)a/mainpage.pl (-1 / +3 lines)
Lines 29-34 use C4::Review qw/numberofreviews/; Link Here
29
use C4::Suggestions qw/CountSuggestion/;
29
use C4::Suggestions qw/CountSuggestion/;
30
use C4::Tags qw/get_count_by_tag_status/;
30
use C4::Tags qw/get_count_by_tag_status/;
31
use Koha::Borrower::Modifications;
31
use Koha::Borrower::Modifications;
32
use Koha::Service::Borrower::Discharge;
32
33
33
my $query = new CGI;
34
my $query = new CGI;
34
35
Lines 61-72 my $pendingtags = get_count_by_tag_status(0); Link Here
61
my $pendingsuggestions = CountSuggestion("ASKED");
62
my $pendingsuggestions = CountSuggestion("ASKED");
62
my $pending_borrower_modifications =
63
my $pending_borrower_modifications =
63
  Koha::Borrower::Modifications->GetPendingModificationsCount( $branch );
64
  Koha::Borrower::Modifications->GetPendingModificationsCount( $branch );
65
my $pending_discharge_requests = Koha::Service::Borrower::Discharge::count({ pending => 1 });
64
66
65
$template->param(
67
$template->param(
66
    pendingcomments                => $pendingcomments,
68
    pendingcomments                => $pendingcomments,
67
    pendingtags                    => $pendingtags,
69
    pendingtags                    => $pendingtags,
68
    pendingsuggestions             => $pendingsuggestions,
70
    pendingsuggestions             => $pendingsuggestions,
69
    pending_borrower_modifications => $pending_borrower_modifications,
71
    pending_borrower_modifications => $pending_borrower_modifications,
72
    pending_discharge_requests     => $pending_discharge_requests,
70
);
73
);
71
74
72
#
75
#
73
- 

Return to bug 8007