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

(-)a/C4/Auth.pm (-1 / +3 lines)
Lines 33-38 use C4::Search::History; Link Here
33
use Koha;
33
use Koha;
34
use Koha::Caches;
34
use Koha::Caches;
35
use Koha::AuthUtils qw(get_script_name hash_password);
35
use Koha::AuthUtils qw(get_script_name hash_password);
36
use Koha::Checkouts;
36
use Koha::DateUtils qw(dt_from_string);
37
use Koha::DateUtils qw(dt_from_string);
37
use Koha::Library::Groups;
38
use Koha::Library::Groups;
38
use Koha::Libraries;
39
use Koha::Libraries;
Lines 499-505 sub get_template_and_user { Link Here
499
            EnableBorrowerFiles                                                        => C4::Context->preference('EnableBorrowerFiles'),
500
            EnableBorrowerFiles                                                        => C4::Context->preference('EnableBorrowerFiles'),
500
            UseKohaPlugins                                                             => C4::Context->preference('UseKohaPlugins'),
501
            UseKohaPlugins                                                             => C4::Context->preference('UseKohaPlugins'),
501
            UseCourseReserves                                                          => C4::Context->preference("UseCourseReserves"),
502
            UseCourseReserves                                                          => C4::Context->preference("UseCourseReserves"),
502
            useDischarge                                                               => C4::Context->preference('useDischarge')
503
            useDischarge                                                               => C4::Context->preference('useDischarge'),
504
            pending_checkout_notes                                                     => scalar Koha::Checkouts->search({ noteseen => 0 }),
503
        );
505
        );
504
    }
506
    }
505
    else {
507
    else {
(-)a/circ/branchoverdues.pl (-4 lines)
Lines 27-33 use C4::Koha; Link Here
27
use C4::Debug;
27
use C4::Debug;
28
use Koha::DateUtils;
28
use Koha::DateUtils;
29
use Koha::BiblioFrameworks;
29
use Koha::BiblioFrameworks;
30
use Koha::Checkouts;
31
use Data::Dumper;
30
use Data::Dumper;
32
31
33
=head1 branchoverdues.pl
32
=head1 branchoverdues.pl
Lines 99-111 foreach my $num (@getoverdues) { Link Here
99
    push( @overduesloop, \%overdueforbranch );
98
    push( @overduesloop, \%overdueforbranch );
100
}
99
}
101
100
102
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
103
104
# initiate the templates for the overdueloop
101
# initiate the templates for the overdueloop
105
$template->param(
102
$template->param(
106
    overduesloop => \@overduesloop,
103
    overduesloop => \@overduesloop,
107
    location     => $location,
104
    location     => $location,
108
    pending_checkout_notes => $pending_checkout_notes,
109
);
105
);
110
106
111
# Checking if there is a Fast Cataloging Framework
107
# Checking if there is a Fast Cataloging Framework
(-)a/circ/branchtransfers.pl (-4 lines)
Lines 35-41 use Koha::AuthorisedValues; Link Here
35
use Koha::Holds;
35
use Koha::Holds;
36
use Koha::Items;
36
use Koha::Items;
37
use Koha::Patrons;
37
use Koha::Patrons;
38
use Koha::Checkouts;
39
38
40
###############################################
39
###############################################
41
#  Getting state
40
#  Getting state
Lines 222-229 foreach my $code ( keys %$messages ) { Link Here
222
# use Data::Dumper;
221
# use Data::Dumper;
223
# warn "FINAL ============= ".Dumper(@trsfitemloop);
222
# warn "FINAL ============= ".Dumper(@trsfitemloop);
224
223
225
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
226
227
$template->param(
224
$template->param(
228
    found                   => $found,
225
    found                   => $found,
229
    reserved                => $reserved,
226
    reserved                => $reserved,
Lines 239-245 $template->param( Link Here
239
    trsfitemloop            => \@trsfitemloop,
236
    trsfitemloop            => \@trsfitemloop,
240
    errmsgloop              => \@errmsgloop,
237
    errmsgloop              => \@errmsgloop,
241
    CircAutocompl           => C4::Context->preference("CircAutocompl"),
238
    CircAutocompl           => C4::Context->preference("CircAutocompl"),
242
    pending_checkout_notes  => $pending_checkout_notes,
243
);
239
);
244
240
245
# Checking if there is a Fast Cataloging Framework
241
# Checking if there is a Fast Cataloging Framework
(-)a/circ/checkout-notes.pl (-6 lines)
Lines 37-48 my ( $template, $loggedinuser, $cookie ) = get_template_and_user( Link Here
37
    }
37
    }
38
);
38
);
39
39
40
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
41
42
$template->param(
43
    pending_checkout_notes => $pending_checkout_notes,
44
);
45
46
my $action;
40
my $action;
47
foreach (qw( seen notseen )) {
41
foreach (qw( seen notseen )) {
48
    $action = $_ if ( $query->param("mark_selected-$_") );
42
    $action = $_ if ( $query->param("mark_selected-$_") );
(-)a/circ/circulation.pl (-4 lines)
Lines 56-62 use Koha::Patron::Messages; Link Here
56
use Koha::SearchEngine;
56
use Koha::SearchEngine;
57
use Koha::SearchEngine::Search;
57
use Koha::SearchEngine::Search;
58
use Koha::Patron::Modifications;
58
use Koha::Patron::Modifications;
59
use Koha::Checkouts;
60
59
61
use Date::Calc qw(
60
use Date::Calc qw(
62
  Today
61
  Today
Lines 146-154 my ( $template, $loggedinuser, $cookie ) = get_template_and_user ( Link Here
146
);
145
);
147
my $logged_in_user = Koha::Patrons->find( $loggedinuser ) or die "Not logged in";
146
my $logged_in_user = Koha::Patrons->find( $loggedinuser ) or die "Not logged in";
148
147
149
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
150
$template->param( pending_checkout_notes => $pending_checkout_notes );
151
152
my $force_allow_issue = $query->param('forceallow') || 0;
148
my $force_allow_issue = $query->param('forceallow') || 0;
153
if (!C4::Auth::haspermission( C4::Context->userenv->{id} , { circulate => 'force_checkout' } )) {
149
if (!C4::Auth::haspermission( C4::Context->userenv->{id} , { circulate => 'force_checkout' } )) {
154
    $force_allow_issue = 0;
150
    $force_allow_issue = 0;
(-)a/circ/on-site_checkouts.pl (-3 lines)
Lines 23-29 use C4::Circulation qw( GetPendingOnSiteCheckouts ); Link Here
23
use C4::Output;
23
use C4::Output;
24
use C4::Koha;
24
use C4::Koha;
25
use Koha::BiblioFrameworks;
25
use Koha::BiblioFrameworks;
26
use Koha::Checkouts;
27
26
28
my $cgi = new CGI;
27
my $cgi = new CGI;
29
28
Lines 40-51 my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user( Link Here
40
# Checking if there is a Fast Cataloging Framework
39
# Checking if there is a Fast Cataloging Framework
41
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
40
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
42
41
43
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
44
my $pending_onsite_checkouts = C4::Circulation::GetPendingOnSiteCheckouts();
42
my $pending_onsite_checkouts = C4::Circulation::GetPendingOnSiteCheckouts();
45
43
46
$template->param(
44
$template->param(
47
    pending_onsite_checkouts => $pending_onsite_checkouts,
45
    pending_onsite_checkouts => $pending_onsite_checkouts,
48
    pending_checkout_notes   => $pending_checkout_notes,
49
);
46
);
50
47
51
output_html_with_http_headers $cgi, $cookie, $template->output;
48
output_html_with_http_headers $cgi, $cookie, $template->output;
(-)a/circ/renew.pl (-4 lines)
Lines 28-34 use C4::Koha; Link Here
28
use Koha::DateUtils;
28
use Koha::DateUtils;
29
use Koha::Database;
29
use Koha::Database;
30
use Koha::BiblioFrameworks;
30
use Koha::BiblioFrameworks;
31
use Koha::Checkouts;
32
31
33
my $cgi = new CGI;
32
my $cgi = new CGI;
34
33
Lines 122-128 if ($barcode) { Link Here
122
# Checking if there is a Fast Cataloging Framework
121
# Checking if there is a Fast Cataloging Framework
123
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
122
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
124
123
125
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
126
$template->param( pending_checkout_notes => $pending_checkout_notes );
127
128
output_html_with_http_headers( $cgi, $cookie, $template->output );
124
output_html_with_http_headers( $cgi, $cookie, $template->output );
(-)a/circ/returns.pl (-4 lines)
Lines 52-58 use Koha::BiblioFrameworks; Link Here
52
use Koha::Holds;
52
use Koha::Holds;
53
use Koha::Items;
53
use Koha::Items;
54
use Koha::Patrons;
54
use Koha::Patrons;
55
use Koha::Checkouts;
56
55
57
my $query = new CGI;
56
my $query = new CGI;
58
57
Lines 580-587 foreach ( sort { $a <=> $b } keys %returneditems ) { Link Here
580
    push @riloop, \%ri;
579
    push @riloop, \%ri;
581
}
580
}
582
581
583
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
584
585
$template->param(
582
$template->param(
586
    riloop         => \@riloop,
583
    riloop         => \@riloop,
587
    printer        => $printer,
584
    printer        => $printer,
Lines 592-598 $template->param( Link Here
592
    forgivemanualholdsexpire => $forgivemanualholdsexpire,
589
    forgivemanualholdsexpire => $forgivemanualholdsexpire,
593
    overduecharges => $overduecharges,
590
    overduecharges => $overduecharges,
594
    AudioAlerts        => C4::Context->preference("AudioAlerts"),
591
    AudioAlerts        => C4::Context->preference("AudioAlerts"),
595
    pending_checkout_notes => $pending_checkout_notes,
596
);
592
);
597
593
598
$itemnumber = GetItemnumberFromBarcode( $barcode );
594
$itemnumber = GetItemnumberFromBarcode( $barcode );
(-)a/circ/selectbranchprinter.pl (-4 lines)
Lines 27-33 use C4::Print; # GetPrinters Link Here
27
use C4::Koha;
27
use C4::Koha;
28
use Koha::BiblioFrameworks;
28
use Koha::BiblioFrameworks;
29
use Koha::Libraries;
29
use Koha::Libraries;
30
use Koha::Checkouts;
31
30
32
# this will be the script that chooses branch and printer settings....
31
# this will be the script that chooses branch and printer settings....
33
32
Lines 127-140 if (scalar @updated and not scalar @recycle_loop) { Link Here
127
    print $query->redirect($referer || '/cgi-bin/koha/circ/circulation.pl');
126
    print $query->redirect($referer || '/cgi-bin/koha/circ/circulation.pl');
128
}
127
}
129
128
130
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
131
132
$template->param(
129
$template->param(
133
    referer     => $referer,
130
    referer     => $referer,
134
    printerloop => \@printerloop,
131
    printerloop => \@printerloop,
135
    branch      => $branch,
132
    branch      => $branch,
136
    recycle_loop=> \@recycle_loop,
133
    recycle_loop=> \@recycle_loop,
137
    pending_checkout_notes => $pending_checkout_notes,
138
);
134
);
139
135
140
# Checking if there is a Fast Cataloging Framework
136
# Checking if there is a Fast Cataloging Framework
(-)a/circ/transferstoreceive.pl (-4 lines)
Lines 40-46 use Koha::Libraries; Link Here
40
use Koha::DateUtils;
40
use Koha::DateUtils;
41
use Koha::BiblioFrameworks;
41
use Koha::BiblioFrameworks;
42
use Koha::Patrons;
42
use Koha::Patrons;
43
use Koha::Checkouts;
44
43
45
my $input = new CGI;
44
my $input = new CGI;
46
my $itemnumber = $input->param('itemnumber');
45
my $itemnumber = $input->param('itemnumber');
Lines 126-139 while ( my $library = $libraries->next ) { Link Here
126
    push( @branchesloop, \%branchloop ) if %branchloop;
125
    push( @branchesloop, \%branchloop ) if %branchloop;
127
}
126
}
128
127
129
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
130
131
$template->param(
128
$template->param(
132
    branchesloop => \@branchesloop,
129
    branchesloop => \@branchesloop,
133
    show_date    => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }),
130
    show_date    => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }),
134
    TransfersMaxDaysWarning => C4::Context->preference('TransfersMaxDaysWarning'),
131
    TransfersMaxDaysWarning => C4::Context->preference('TransfersMaxDaysWarning'),
135
    latetransfers => $latetransfers ? 1 : 0,
132
    latetransfers => $latetransfers ? 1 : 0,
136
    pending_checkout_notes => $pending_checkout_notes,
137
);
133
);
138
134
139
# Checking if there is a Fast Cataloging Framework
135
# Checking if there is a Fast Cataloging Framework
(-)a/circ/view_holdsqueue.pl (-4 lines)
Lines 30-36 use C4::Biblio; Link Here
30
use C4::Items;
30
use C4::Items;
31
use C4::HoldsQueue qw(GetHoldsQueueItems);
31
use C4::HoldsQueue qw(GetHoldsQueueItems);
32
use Koha::BiblioFrameworks;
32
use Koha::BiblioFrameworks;
33
use Koha::Checkouts;
34
use Koha::ItemTypes;
33
use Koha::ItemTypes;
35
34
36
my $query = new CGI;
35
my $query = new CGI;
Lines 64-72 if ( $run_report ) { Link Here
64
    );
63
    );
65
}
64
}
66
65
67
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
68
$template->param( pending_checkout_notes => $pending_checkout_notes );
69
70
# Checking if there is a Fast Cataloging Framework
66
# Checking if there is a Fast Cataloging Framework
71
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
67
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
72
68
(-)a/circ/waitingreserves.pl (-4 lines)
Lines 39-45 use Koha::BiblioFrameworks; Link Here
39
use Koha::Items;
39
use Koha::Items;
40
use Koha::ItemTypes;
40
use Koha::ItemTypes;
41
use Koha::Patrons;
41
use Koha::Patrons;
42
use Koha::Checkouts;
43
42
44
my $input = new CGI;
43
my $input = new CGI;
45
44
Lines 151-158 while ( my $hold = $holds->next ) { Link Here
151
150
152
$template->param(cancel_result => \@cancel_result) if @cancel_result;
151
$template->param(cancel_result => \@cancel_result) if @cancel_result;
153
152
154
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
155
156
$template->param(
153
$template->param(
157
    reserveloop => \@reservloop,
154
    reserveloop => \@reservloop,
158
    reservecount => $reservcount,
155
    reservecount => $reservcount,
Lines 161-167 $template->param( Link Here
161
    show_date   => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }),
158
    show_date   => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }),
162
    ReservesMaxPickUpDelay => $max_pickup_delay,
159
    ReservesMaxPickUpDelay => $max_pickup_delay,
163
    tab => $tab,
160
    tab => $tab,
164
    pending_checkout_notes => $pending_checkout_notes,
165
);
161
);
166
162
167
# Checking if there is a Fast Cataloging Framework
163
# Checking if there is a Fast Cataloging Framework
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc (-1 / +1 lines)
Lines 34-40 Link Here
34
                <li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=FA">Fast cataloging</a></li>
34
                <li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=FA">Fast cataloging</a></li>
35
            [% END %][% END %]
35
            [% END %][% END %]
36
            [% IF Koha.Preference('AllowCheckoutNotes') && CAN_user_circulate_manage_checkout_notes %]
36
            [% IF Koha.Preference('AllowCheckoutNotes') && CAN_user_circulate_manage_checkout_notes %]
37
                <li><a href="/cgi-bin/koha/circ/checkout-notes.pl">Checkout notes</a> [% IF pending_checkout_notes %]<span class="number_box"><a href="/cgi-bin/koha/circ/checkout-notes.pl">[% pending_checkout_notes %]</span>[% END %]</li>
37
                <li><a href="/cgi-bin/koha/circ/checkout-notes.pl">Checkout notes</a> [% IF pending_checkout_notes.count %]<span class="number_box"><a href="/cgi-bin/koha/circ/checkout-notes.pl">[% pending_checkout_notes.count %]</span>[% END %]</li>
38
            [% END %]
38
            [% END %]
39
        </ul>
39
        </ul>
40
40
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt (-3 / +3 lines)
Lines 125-131 Link Here
125
                <div class="row">
125
                <div class="row">
126
                    <div class="col-sm-12">
126
                    <div class="col-sm-12">
127
                        [%# Following statement must be in one line for translatability %]
127
                        [%# Following statement must be in one line for translatability %]
128
                        [% IF ( ( CAN_user_tools_moderate_comments  && pendingcomments ) || ( CAN_user_tools_moderate_tags && pendingtags ) || ( CAN_user_borrowers_edit_borrowers && pending_borrower_modifications ) || ( CAN_user_acquisition && pendingsuggestions ) || ( CAN_user_borrowers_edit_borrowers && pending_discharge_requests ) || pending_article_requests) || ( Koha.Preference('AllowCheckoutNotes') && CAN_user_circulate_manage_checkout_notes && pending_checkout_notes ) %]
128
                        [% IF ( ( CAN_user_tools_moderate_comments  && pendingcomments ) || ( CAN_user_tools_moderate_tags && pendingtags ) || ( CAN_user_borrowers_edit_borrowers && pending_borrower_modifications ) || ( CAN_user_acquisition && pendingsuggestions ) || ( CAN_user_borrowers_edit_borrowers && pending_discharge_requests ) || pending_article_requests) || ( Koha.Preference('AllowCheckoutNotes') && CAN_user_circulate_manage_checkout_notes && pending_checkout_notes.count ) %]
129
                            <div id="area-pending">
129
                            <div id="area-pending">
130
                                [% IF pending_article_requests %]
130
                                [% IF pending_article_requests %]
131
                                <div class="pending-info" id="article_requests_pending">
131
                                <div class="pending-info" id="article_requests_pending">
Lines 172-181 Link Here
172
                                </div>
172
                                </div>
173
                                [% END %]
173
                                [% END %]
174
174
175
                                [% IF Koha.Preference('AllowCheckoutNotes') && CAN_user_circulate_manage_checkout_notes && pending_checkout_notes %]
175
                                [% IF Koha.Preference('AllowCheckoutNotes') && CAN_user_circulate_manage_checkout_notes && pending_checkout_notes.count %]
176
                                    <div class="pending-info" id="checkout_notes_pending">
176
                                    <div class="pending-info" id="checkout_notes_pending">
177
                                        <a href="/cgi-bin/koha/circ/checkout-notes.pl">Checkout notes pending</a>:
177
                                        <a href="/cgi-bin/koha/circ/checkout-notes.pl">Checkout notes pending</a>:
178
                                        <span class="pending-number-link">[% pending_checkout_notes %]</span>
178
                                        <span class="pending-number-link">[% pending_checkout_notes.count %]</span>
179
                                    </div>
179
                                    </div>
180
                                [% END %]
180
                                [% END %]
181
181
(-)a/mainpage.pl (-4 lines)
Lines 31-37 use Koha::Patron::Modifications; Link Here
31
use Koha::Patron::Discharge;
31
use Koha::Patron::Discharge;
32
use Koha::Reviews;
32
use Koha::Reviews;
33
use Koha::ArticleRequests;
33
use Koha::ArticleRequests;
34
use Koha::Checkouts;
35
34
36
my $query = new CGI;
35
my $query = new CGI;
37
36
Lines 75-81 my $pending_article_requests = Koha::ArticleRequests->search_limited( Link Here
75
        $branch ? ( branchcode => $branch ) : (),
74
        $branch ? ( branchcode => $branch ) : (),
76
    }
75
    }
77
)->count;
76
)->count;
78
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
79
77
80
$template->param(
78
$template->param(
81
    pendingcomments                => $pendingcomments,
79
    pendingcomments                => $pendingcomments,
Lines 84-90 $template->param( Link Here
84
    pending_borrower_modifications => $pending_borrower_modifications,
82
    pending_borrower_modifications => $pending_borrower_modifications,
85
    pending_discharge_requests     => $pending_discharge_requests,
83
    pending_discharge_requests     => $pending_discharge_requests,
86
    pending_article_requests       => $pending_article_requests,
84
    pending_article_requests       => $pending_article_requests,
87
    pending_checkout_notes         => $pending_checkout_notes,
88
);
85
);
89
86
90
output_html_with_http_headers $query, $cookie, $template->output;
87
output_html_with_http_headers $query, $cookie, $template->output;
91
- 

Return to bug 17698