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

(-)a/C4/Auth.pm (+2 lines)
Lines 416-421 sub get_template_and_user { Link Here
416
            EnableBorrowerFiles                                                        => C4::Context->preference('EnableBorrowerFiles'),
416
            EnableBorrowerFiles                                                        => C4::Context->preference('EnableBorrowerFiles'),
417
            UseKohaPlugins                                                             => C4::Context->preference('UseKohaPlugins'),
417
            UseKohaPlugins                                                             => C4::Context->preference('UseKohaPlugins'),
418
            UseCourseReserves                                                          => C4::Context->preference("UseCourseReserves"),
418
            UseCourseReserves                                                          => C4::Context->preference("UseCourseReserves"),
419
            useDischarge                                                               => C4::Context->preference('useDischarge'),
419
        );
420
        );
420
    }
421
    }
421
    else {
422
    else {
Lines 528-533 sub get_template_and_user { Link Here
528
            OPACLocalCoverImages                  => C4::Context->preference("OPACLocalCoverImages"),
529
            OPACLocalCoverImages                  => C4::Context->preference("OPACLocalCoverImages"),
529
            PatronSelfRegistration                => C4::Context->preference("PatronSelfRegistration"),
530
            PatronSelfRegistration                => C4::Context->preference("PatronSelfRegistration"),
530
            PatronSelfRegistrationDefaultCategory => C4::Context->preference("PatronSelfRegistrationDefaultCategory"),
531
            PatronSelfRegistrationDefaultCategory => C4::Context->preference("PatronSelfRegistrationDefaultCategory"),
532
            useDischarge                 => C4::Context->preference('useDischarge'),
531
        );
533
        );
532
534
533
        $template->param( OpacPublic => '1' ) if ( $user || C4::Context->preference("OpacPublic") );
535
        $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 91-96 Link Here
91
    [% IF ( CAN_user_borrowers ) %]
91
    [% IF ( CAN_user_borrowers ) %]
92
        [% IF ( suggestionsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/purchase-suggestions.pl?borrowernumber=[% borrowernumber %]">Purchase suggestions</a></li>
92
        [% IF ( suggestionsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/purchase-suggestions.pl?borrowernumber=[% borrowernumber %]">Purchase suggestions</a></li>
93
    [% END %]
93
    [% END %]
94
    [% IF CAN_user_borrowers && useDischarge %]
95
        [% IF dischargeview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/discharge.pl?borrowernumber=[% borrowernumber %]">Discharge</a></li>
96
    [% END %]
94
</ul></div>
97
</ul></div>
95
[% END %]
98
[% END %]
96
99
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt (+3 lines)
Lines 90-95 in the global namespace %] Link Here
90
    [% IF ( CAN_user_borrowers ) %]
90
    [% IF ( CAN_user_borrowers ) %]
91
        [% 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>
91
        [% 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>
92
    [% END %]
92
    [% END %]
93
    [% IF CAN_user_borrowers && useDischarge %]
94
        [% IF dischargeview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/discharge.pl?borrowernumber=[% borrowernumber %]">Discharge</a></li>
95
    [% END %]
93
</ul></div>
96
</ul></div>
94
[% END %]
97
[% END %]
95
98
(-)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-144 Patrons: Link Here
139
         - pref: CardnumberLength
139
         - pref: CardnumberLength
140
         - "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')."
140
         - "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')."
141
         - "If 'cardnumber' is included in the BorrowerMandatoryField list, the minimum length, if not specified here, defaults to one."
141
         - "If 'cardnumber' is included in the BorrowerMandatoryField list, the minimum length, if not specified here, defaults to one."
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.
142
    "Norwegian patron database":
148
    "Norwegian patron database":
143
     -
149
     -
144
         - pref: NorwegianPatronDBEnable
150
         - pref: NorwegianPatronDBEnable
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt (-1 / +10 lines)
Lines 111-117 Link Here
111
            [% IF ( ( CAN_user_tools_moderate_comments  && pendingcomments ) 
111
            [% IF ( ( CAN_user_tools_moderate_comments  && pendingcomments ) 
112
                    || ( CAN_user_tools_moderate_tags && pendingtags )
112
                    || ( CAN_user_tools_moderate_tags && pendingtags )
113
                    || ( CAN_user_borrowers && pending_borrower_modifications )
113
                    || ( CAN_user_borrowers && pending_borrower_modifications )
114
                    || ( CAN_user_acquisition && pendingsuggestions ) ) %]
114
                    || ( CAN_user_acquisition && pendingsuggestions )
115
                    || ( CAN_user_borrowers && pending_discharge_requests )
116
            ) %]
115
                <div id="area-pending">
117
                <div id="area-pending">
116
                    [% IF ( CAN_user_acquisition && pendingsuggestions ) %]
118
                    [% IF ( CAN_user_acquisition && pendingsuggestions ) %]
117
                    <div class="pending-info" id="suggestions_pending">
119
                    <div class="pending-info" id="suggestions_pending">
Lines 143-148 Link Here
143
                    </div>
145
                    </div>
144
                    [% END %]
146
                    [% END %]
145
147
148
                    [% IF CAN_user_borrowers && pending_discharge_requests %]
149
                    <div class="pending-info" id="patron_discharges_pending">
150
                        <a href="/cgi-bin/koha/members/discharges.pl">Discharge requests pending</a>:
151
                        <span class="pending-number-link">[% pending_discharge_requests %]</span>
152
                    </div>
153
                    [% END %]
154
146
                </div>
155
                </div>
147
156
148
            [% END %]
157
            [% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc (+9 lines)
Lines 95-100 Link Here
95
                [% END %]
95
                [% END %]
96
                <a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves">your lists</a></li>
96
                <a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves">your lists</a></li>
97
            [% END %]
97
            [% END %]
98
99
            [% IF Koha.Preference( 'useDischarge' ) == 1 %]
100
                [% IF ( dischargeview ) %]
101
                    <li class="active">
102
                [% ELSE %]
103
                    <li>
104
                [% END %]
105
                <a href="/cgi-bin/koha/opac-discharge.pl">ask for a discharge</a></li>
106
            [% END %]
98
        </ul>
107
        </ul>
99
    </div>
108
    </div>
100
[% END %]
109
[% 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::Borrower::Discharge;
32
33
33
my $query = new CGI;
34
my $query = new CGI;
34
35
Lines 65-76 my $pendingtags = get_count_by_tag_status(0); Link Here
65
my $pendingsuggestions = CountSuggestion("ASKED");
66
my $pendingsuggestions = CountSuggestion("ASKED");
66
my $pending_borrower_modifications =
67
my $pending_borrower_modifications =
67
  Koha::Borrower::Modifications->GetPendingModificationsCount( $branch );
68
  Koha::Borrower::Modifications->GetPendingModificationsCount( $branch );
69
my $pending_discharge_requests = Koha::Borrower::Discharge::count({ pending => 1 });
68
70
69
$template->param(
71
$template->param(
70
    pendingcomments                => $pendingcomments,
72
    pendingcomments                => $pendingcomments,
71
    pendingtags                    => $pendingtags,
73
    pendingtags                    => $pendingtags,
72
    pendingsuggestions             => $pendingsuggestions,
74
    pendingsuggestions             => $pendingsuggestions,
73
    pending_borrower_modifications => $pending_borrower_modifications,
75
    pending_borrower_modifications => $pending_borrower_modifications,
76
    pending_discharge_requests     => $pending_discharge_requests,
74
);
77
);
75
78
76
#
79
#
77
- 

Return to bug 8007