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

(-)a/circ/branchoverdues.pl (+4 lines)
Lines 27-32 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;
30
use Data::Dumper;
31
use Data::Dumper;
31
32
32
=head1 branchoverdues.pl
33
=head1 branchoverdues.pl
Lines 98-107 foreach my $num (@getoverdues) { Link Here
98
    push( @overduesloop, \%overdueforbranch );
99
    push( @overduesloop, \%overdueforbranch );
99
}
100
}
100
101
102
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
103
101
# initiate the templates for the overdueloop
104
# initiate the templates for the overdueloop
102
$template->param(
105
$template->param(
103
    overduesloop => \@overduesloop,
106
    overduesloop => \@overduesloop,
104
    location     => $location,
107
    location     => $location,
108
    pending_checkout_notes => $pending_checkout_notes,
105
);
109
);
106
110
107
# Checking if there is a Fast Cataloging Framework
111
# Checking if there is a Fast Cataloging Framework
(-)a/circ/checkout-notes.pl (-3 / +5 lines)
Lines 37-46 my ( $template, $loggedinuser, $cookie ) = get_template_and_user( Link Here
37
    }
37
    }
38
);
38
);
39
39
40
my $schema = Koha::Database->new()->schema();
40
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
41
my @notes = $schema->resultset('Issue')->search({ 'me.note' => { '!=', undef } }, { prefetch => [ 'borrower', { item => 'biblionumber' } ] });
41
my @notes = Koha::Checkouts->search({ 'me.note' => { '!=', undef } }, { prefetch => [ 'borrower', { item => 'biblionumber' } ] });
42
42
$template->param(
43
$template->param(
43
    notes     => \@notes,
44
    pending_checkout_notes => $pending_checkout_notes,
45
    notes                  => \@notes,
44
);
46
);
45
47
46
my $action;
48
my $action;
(-)a/circ/circulation.pl (+4 lines)
Lines 56-61 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;
59
60
60
use Date::Calc qw(
61
use Date::Calc qw(
61
  Today
62
  Today
Lines 145-150 my ( $template, $loggedinuser, $cookie ) = get_template_and_user ( Link Here
145
);
146
);
146
my $logged_in_user = Koha::Patrons->find( $loggedinuser ) or die "Not logged in";
147
my $logged_in_user = Koha::Patrons->find( $loggedinuser ) or die "Not logged in";
147
148
149
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
150
$template->param( pending_checkout_notes => $pending_checkout_notes );
151
148
my $force_allow_issue = $query->param('forceallow') || 0;
152
my $force_allow_issue = $query->param('forceallow') || 0;
149
if (!C4::Auth::haspermission( C4::Context->userenv->{id} , { circulate => 'force_checkout' } )) {
153
if (!C4::Auth::haspermission( C4::Context->userenv->{id} , { circulate => 'force_checkout' } )) {
150
    $force_allow_issue = 0;
154
    $force_allow_issue = 0;
(-)a/circ/on-site_checkouts.pl (-1 / +3 lines)
Lines 23-28 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;
26
27
27
my $cgi = new CGI;
28
my $cgi = new CGI;
28
29
Lines 39-49 my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user( Link Here
39
# Checking if there is a Fast Cataloging Framework
40
# Checking if there is a Fast Cataloging Framework
40
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
41
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
41
42
42
43
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
43
my $pending_onsite_checkouts = C4::Circulation::GetPendingOnSiteCheckouts();
44
my $pending_onsite_checkouts = C4::Circulation::GetPendingOnSiteCheckouts();
44
45
45
$template->param(
46
$template->param(
46
    pending_onsite_checkouts => $pending_onsite_checkouts,
47
    pending_onsite_checkouts => $pending_onsite_checkouts,
48
    pending_onsite_notes     => $pending_onsite_notes,
47
);
49
);
48
50
49
output_html_with_http_headers $cgi, $cookie, $template->output;
51
output_html_with_http_headers $cgi, $cookie, $template->output;
(-)a/circ/renew.pl (+4 lines)
Lines 28-33 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;
31
32
32
my $cgi = new CGI;
33
my $cgi = new CGI;
33
34
Lines 121-124 if ($barcode) { Link Here
121
# Checking if there is a Fast Cataloging Framework
122
# Checking if there is a Fast Cataloging Framework
122
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
123
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
123
124
125
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
126
$template->param( pending_checkout_notes => $pending_checkout_notes );
127
124
output_html_with_http_headers( $cgi, $cookie, $template->output );
128
output_html_with_http_headers( $cgi, $cookie, $template->output );
(-)a/circ/returns.pl (+4 lines)
Lines 52-57 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;
55
56
56
my $query = new CGI;
57
my $query = new CGI;
57
58
Lines 580-585 foreach ( sort { $a <=> $b } keys %returneditems ) { Link Here
580
    push @riloop, \%ri;
581
    push @riloop, \%ri;
581
}
582
}
582
583
584
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
585
583
$template->param(
586
$template->param(
584
    riloop         => \@riloop,
587
    riloop         => \@riloop,
585
    printer        => $printer,
588
    printer        => $printer,
Lines 590-595 $template->param( Link Here
590
    forgivemanualholdsexpire => $forgivemanualholdsexpire,
593
    forgivemanualholdsexpire => $forgivemanualholdsexpire,
591
    overduecharges => $overduecharges,
594
    overduecharges => $overduecharges,
592
    AudioAlerts        => C4::Context->preference("AudioAlerts"),
595
    AudioAlerts        => C4::Context->preference("AudioAlerts"),
596
    pending_checkout_notes => $pending_checkout_notes,
593
);
597
);
594
598
595
$itemnumber = GetItemnumberFromBarcode( $barcode );
599
$itemnumber = GetItemnumberFromBarcode( $barcode );
(-)a/circ/selectbranchprinter.pl (+4 lines)
Lines 27-32 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;
30
31
31
# this will be the script that chooses branch and printer settings....
32
# this will be the script that chooses branch and printer settings....
32
33
Lines 126-136 if (scalar @updated and not scalar @recycle_loop) { Link Here
126
    print $query->redirect($referer || '/cgi-bin/koha/circ/circulation.pl');
127
    print $query->redirect($referer || '/cgi-bin/koha/circ/circulation.pl');
127
}
128
}
128
129
130
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
131
129
$template->param(
132
$template->param(
130
    referer     => $referer,
133
    referer     => $referer,
131
    printerloop => \@printerloop,
134
    printerloop => \@printerloop,
132
    branch      => $branch,
135
    branch      => $branch,
133
    recycle_loop=> \@recycle_loop,
136
    recycle_loop=> \@recycle_loop,
137
    pending_checkout_notes => $pending_checkout_notes,
134
);
138
);
135
139
136
# Checking if there is a Fast Cataloging Framework
140
# Checking if there is a Fast Cataloging Framework
(-)a/circ/transferstoreceive.pl (-2 / +6 lines)
Lines 40-45 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;
43
44
44
my $input = new CGI;
45
my $input = new CGI;
45
my $itemnumber = $input->param('itemnumber');
46
my $itemnumber = $input->param('itemnumber');
Lines 125-135 while ( my $library = $libraries->next ) { Link Here
125
    push( @branchesloop, \%branchloop ) if %branchloop;
126
    push( @branchesloop, \%branchloop ) if %branchloop;
126
}
127
}
127
128
129
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
130
128
$template->param(
131
$template->param(
129
    branchesloop => \@branchesloop,
132
    branchesloop => \@branchesloop,
130
    show_date    => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }),
133
    show_date    => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }),
131
	TransfersMaxDaysWarning => C4::Context->preference('TransfersMaxDaysWarning'),
134
    TransfersMaxDaysWarning => C4::Context->preference('TransfersMaxDaysWarning'),
132
	latetransfers => $latetransfers ? 1 : 0,
135
    latetransfers => $latetransfers ? 1 : 0,
136
    pending_checkout_notes => $pending_checkout_notes,
133
);
137
);
134
138
135
# Checking if there is a Fast Cataloging Framework
139
# Checking if there is a Fast Cataloging Framework
(-)a/circ/view_holdsqueue.pl (-1 / +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
33
use Koha::Checkouts;
34
use Koha::ItemTypes;
34
use Koha::ItemTypes;
35
35
36
my $query = new CGI;
36
my $query = new CGI;
Lines 64-69 if ( $run_report ) { Link Here
64
    );
64
    );
65
}
65
}
66
66
67
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
68
$template->param( pending_checkout_notes => $pending_checkout_notes );
69
67
# Checking if there is a Fast Cataloging Framework
70
# Checking if there is a Fast Cataloging Framework
68
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
71
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
69
72
(-)a/circ/waitingreserves.pl (+5 lines)
Lines 39-44 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;
42
43
43
my $input = new CGI;
44
my $input = new CGI;
44
45
Lines 149-154 while ( my $hold = $holds->next ) { Link Here
149
}
150
}
150
151
151
$template->param(cancel_result => \@cancel_result) if @cancel_result;
152
$template->param(cancel_result => \@cancel_result) if @cancel_result;
153
154
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
155
152
$template->param(
156
$template->param(
153
    reserveloop => \@reservloop,
157
    reserveloop => \@reservloop,
154
    reservecount => $reservcount,
158
    reservecount => $reservcount,
Lines 157-162 $template->param( Link Here
157
    show_date   => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }),
161
    show_date   => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }),
158
    ReservesMaxPickUpDelay => $max_pickup_delay,
162
    ReservesMaxPickUpDelay => $max_pickup_delay,
159
    tab => $tab,
163
    tab => $tab,
164
    pending_checkout_notes => $pending_checkout_notes,
160
);
165
);
161
166
162
# Checking if there is a Fast Cataloging Framework
167
# Checking if there is a Fast Cataloging Framework
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc (+3 lines)
Lines 33-38 Link Here
33
            [% IF ( fast_cataloging ) %][% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
33
            [% IF ( fast_cataloging ) %][% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
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 %]
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>
38
            [% END %]
36
        </ul>
39
        </ul>
37
40
38
        <h5>Circulation reports</h5>
41
        <h5>Circulation reports</h5>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/checkout-notes.tt (-15 / +28 lines)
Lines 83-91 Link Here
83
    Checkout notes
83
    Checkout notes
84
</div>
84
</div>
85
85
86
<div id="doc" class="yui-t7"> <!-- <div id="doc3" class="yui-t2" -->
86
[% IF Koha.Preference('CircSidebar') %]<div id="doc3" class="yui-t2">[% ELSE %]<div id="doc" class="yui-t7">[% END %]
87
    <div id="bd">
87
    <div id="bd">
88
        <div id="yui-main">
88
        <div id="yui-main">
89
        [% IF Koha.Preference('CircSidebar') %]<div class="yui-b">[% END %]
89
90
90
            <h1>Checkout notes</h1>
91
            <h1>Checkout notes</h1>
91
92
Lines 127-146 Link Here
127
                                [% FOREACH note IN notes %]
128
                                [% FOREACH note IN notes %]
128
                                    <tr>
129
                                    <tr>
129
                                        <td><input type="checkbox" name="issue_ids" value="[% note.issue_id %]"></td>
130
                                        <td><input type="checkbox" name="issue_ids" value="[% note.issue_id %]"></td>
130
                                        <td>[% note.item.biblionumber.title %] - [% note.item.biblionumber.author %] (<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% note.item.biblionumber.biblionumber %]">[% note.item.barcode %]</a>)</td>
131
                                        <td>[% note.item.biblio.title %] - [% note.item.biblio.author %] (<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% note.item.biblionumber %]">[% note.item.barcode %]</a>)</td>
131
                                        <td>[% note.note %]</td>
132
                                        <td>[% note.note %]</td>
132
                                        <td>[% note.notedate | $KohaDates %]</td>
133
                                        <td>[% note.notedate | $KohaDates %]</td>
133
                                        <td>[% note.borrower.firstname %] [% note.borrower.surname %] (<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% note.borrower.borrowernumber %]">[% note.borrower.cardnumber %]</a>)</td>
134
                                        <td>[% IF note.borrower.title %][% note.borrower.title [% END %][% note.borrower.firstname %] [% note.borrower.surname %] (<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% note.borrower.borrowernumber %]">[% note.borrower.cardnumber %]</a>)</td>
134
                                        <td>[% IF ( note.noteseen == 0 ) %]
135
                                        <td>
135
                                            <span id="status_[% note.issue_id %]">Not seen</span>
136
                                            [% IF ( note.noteseen == 0 ) %]
136
                                        [% ELSIF ( note.noteseen == 1 ) %]
137
                                                <span id="status_[% note.issue_id %]">Not seen</span>
137
                                            <span id="status_[% note.issue_id %]">Seen</span>
138
                                            [% ELSIF ( note.noteseen == 1 ) %]
138
                                        [% END %]</td>
139
                                                <span id="status_[% note.issue_id %]">Seen</span>
139
                                        <td class="actions">[% IF ( note.noteseen == 1 ) %]
140
                                            [% END %]
140
                                            <button name="seen" data-issue_id="[% note.issue_id %]" class="seen btn btn-default btn-xs" disabled="disabled"><i class="fa fa-eye"></i> Mark seen</button> <button name="notseen" data-issue_id="[% note.issue_id %]" class="notseen btn btn-default btn-xs"><i class="fa fa-eye-slash"></i> Mark not seen</button>
141
                                        </td>
141
                                        [% ELSIF ( note.noteseen == 0 ) %]
142
                                        <td class="actions">
142
                                            <button name="seen" data-issue_id="[% note.issue_id %]" class="seen btn btn-default btn-xs"><i class="fa fa-eye"></i> Mark seen</button> <button name="notseen" data-issue_id="[% note.issue_id %]" class="notseen btn btn-default btn-xs" disabled="disabled"><i class="fa fa-eye-slash"></i> Mark not seen</button>
143
                                            [% IF ( note.noteseen == 1 ) %]
143
                                        [% END %]</td>
144
                                                <button name="seen" data-issue_id="[% note.issue_id %]" class="seen btn btn-default btn-xs" disabled="disabled"><i class="fa fa-eye"></i> Mark seen</button> <button name="notseen" data-issue_id="[% note.issue_id %]" class="notseen btn btn-default btn-xs"><i class="fa fa-eye-slash"></i> Mark not seen</button>
145
                                            [% ELSIF ( note.noteseen == 0 ) %]
146
                                                <button name="seen" data-issue_id="[% note.issue_id %]" class="seen btn btn-default btn-xs"><i class="fa fa-eye"></i> Mark seen</button> <button name="notseen" data-issue_id="[% note.issue_id %]" class="notseen btn btn-default btn-xs" disabled="disabled"><i class="fa fa-eye-slash"></i> Mark not seen</button>
147
                                            [% END %]
148
                                        </td>
144
                                    </tr>
149
                                    </tr>
145
                                [% END %]
150
                                [% END %]
146
                            </tbody>
151
                            </tbody>
Lines 157-163 Link Here
157
162
158
            [% END %] <!-- selected_count -->
163
            [% END %] <!-- selected_count -->
159
164
160
        </div> <!-- yui-main -->
165
        </div> <!-- yui-imain -->
166
167
        [% IF Koha.Preference('CircSidebar') %]
168
        </div>
169
170
        <div class="yui-b noprint">
171
            [% INCLUDE 'circ-nav.inc' %]
172
        </div>
173
        [% END %]
174
161
    </div> <!-- bd -->
175
    </div> <!-- bd -->
162
</div> <!-- doc3 -->
176
</div> <!-- doc3 -->
163
177
164
- 

Return to bug 17698