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

(-)a/circ/branchoverdues.pl (+4 lines)
Lines 28-33 use C4::Koha; Link Here
28
use C4::Debug;
28
use C4::Debug;
29
use Koha::DateUtils;
29
use Koha::DateUtils;
30
use Koha::BiblioFrameworks;
30
use Koha::BiblioFrameworks;
31
use Koha::Checkouts;
31
use Data::Dumper;
32
use Data::Dumper;
32
33
33
=head1 branchoverdues.pl
34
=head1 branchoverdues.pl
Lines 99-108 foreach my $num (@getoverdues) { Link Here
99
    push( @overduesloop, \%overdueforbranch );
100
    push( @overduesloop, \%overdueforbranch );
100
}
101
}
101
102
103
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
104
102
# initiate the templates for the overdueloop
105
# initiate the templates for the overdueloop
103
$template->param(
106
$template->param(
104
    overduesloop => \@overduesloop,
107
    overduesloop => \@overduesloop,
105
    location     => $location,
108
    location     => $location,
109
    pending_checkout_notes => $pending_checkout_notes,
106
);
110
);
107
111
108
# Checking if there is a Fast Cataloging Framework
112
# 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 130-135 my ( $template, $loggedinuser, $cookie ) = get_template_and_user ( Link Here
130
    }
131
    }
131
);
132
);
132
133
134
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
135
$template->param( pending_checkout_notes => $pending_checkout_notes );
136
133
my $force_allow_issue = $query->param('forceallow') || 0;
137
my $force_allow_issue = $query->param('forceallow') || 0;
134
if (!C4::Auth::haspermission( C4::Context->userenv->{id} , { circulate => 'force_checkout' } )) {
138
if (!C4::Auth::haspermission( C4::Context->userenv->{id} , { circulate => 'force_checkout' } )) {
135
    $force_allow_issue = 0;
139
    $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 53-58 use Koha::BiblioFrameworks; Link Here
53
use Koha::Holds;
53
use Koha::Holds;
54
use Koha::Items;
54
use Koha::Items;
55
use Koha::Patrons;
55
use Koha::Patrons;
56
use Koha::Checkouts;
56
57
57
my $query = new CGI;
58
my $query = new CGI;
58
59
Lines 630-635 foreach ( sort { $a <=> $b } keys %returneditems ) { Link Here
630
    push @riloop, \%ri;
631
    push @riloop, \%ri;
631
}
632
}
632
633
634
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
635
633
$template->param(
636
$template->param(
634
    riloop         => \@riloop,
637
    riloop         => \@riloop,
635
    printer        => $printer,
638
    printer        => $printer,
Lines 640-645 $template->param( Link Here
640
    forgivemanualholdsexpire => $forgivemanualholdsexpire,
643
    forgivemanualholdsexpire => $forgivemanualholdsexpire,
641
    overduecharges => $overduecharges,
644
    overduecharges => $overduecharges,
642
    AudioAlerts        => C4::Context->preference("AudioAlerts"),
645
    AudioAlerts        => C4::Context->preference("AudioAlerts"),
646
    pending_checkout_notes => $pending_checkout_notes,
643
);
647
);
644
648
645
$itemnumber = GetItemnumberFromBarcode( $barcode );
649
$itemnumber = GetItemnumberFromBarcode( $barcode );
(-)a/circ/selectbranchprinter.pl (+4 lines)
Lines 28-33 use C4::Print; # GetPrinters Link Here
28
use C4::Koha;
28
use C4::Koha;
29
use Koha::BiblioFrameworks;
29
use Koha::BiblioFrameworks;
30
use Koha::Libraries;
30
use Koha::Libraries;
31
use Koha::Checkouts;
31
32
32
# this will be the script that chooses branch and printer settings....
33
# this will be the script that chooses branch and printer settings....
33
34
Lines 127-137 if (scalar @updated and not scalar @recycle_loop) { Link Here
127
    print $query->redirect($referer || '/cgi-bin/koha/circ/circulation.pl');
128
    print $query->redirect($referer || '/cgi-bin/koha/circ/circulation.pl');
128
}
129
}
129
130
131
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
132
130
$template->param(
133
$template->param(
131
    referer     => $referer,
134
    referer     => $referer,
132
    printerloop => \@printerloop,
135
    printerloop => \@printerloop,
133
    branch      => $branch,
136
    branch      => $branch,
134
    recycle_loop=> \@recycle_loop,
137
    recycle_loop=> \@recycle_loop,
138
    pending_checkout_notes => $pending_checkout_notes,
135
);
139
);
136
140
137
# Checking if there is a Fast Cataloging Framework
141
# Checking if there is a Fast Cataloging Framework
(-)a/circ/transferstoreceive.pl (-2 / +6 lines)
Lines 41-46 use Koha::Libraries; Link Here
41
use Koha::DateUtils;
41
use Koha::DateUtils;
42
use Koha::BiblioFrameworks;
42
use Koha::BiblioFrameworks;
43
use Koha::Patrons;
43
use Koha::Patrons;
44
use Koha::Checkouts;
44
45
45
my $input = new CGI;
46
my $input = new CGI;
46
my $itemnumber = $input->param('itemnumber');
47
my $itemnumber = $input->param('itemnumber');
Lines 132-142 while ( my $library = $libraries->next ) { Link Here
132
    push( @branchesloop, \%branchloop ) if %branchloop;
133
    push( @branchesloop, \%branchloop ) if %branchloop;
133
}
134
}
134
135
136
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
137
135
$template->param(
138
$template->param(
136
    branchesloop => \@branchesloop,
139
    branchesloop => \@branchesloop,
137
    show_date    => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }),
140
    show_date    => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }),
138
	TransfersMaxDaysWarning => C4::Context->preference('TransfersMaxDaysWarning'),
141
    TransfersMaxDaysWarning => C4::Context->preference('TransfersMaxDaysWarning'),
139
	latetransfers => $latetransfers ? 1 : 0,
142
    latetransfers => $latetransfers ? 1 : 0,
143
    pending_checkout_notes => $pending_checkout_notes,
140
);
144
);
141
145
142
# Checking if there is a Fast Cataloging Framework
146
# Checking if there is a Fast Cataloging Framework
(-)a/circ/view_holdsqueue.pl (-1 / +4 lines)
Lines 31-37 use C4::Biblio; Link Here
31
use C4::Items;
31
use C4::Items;
32
use C4::HoldsQueue qw(GetHoldsQueueItems);
32
use C4::HoldsQueue qw(GetHoldsQueueItems);
33
use Koha::BiblioFrameworks;
33
use Koha::BiblioFrameworks;
34
34
use Koha::Checkouts;
35
use Koha::ItemTypes;
35
use Koha::ItemTypes;
36
36
37
my $query = new CGI;
37
my $query = new CGI;
Lines 62-67 if ( $run_report ) { Link Here
62
    );
62
    );
63
}
63
}
64
64
65
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
66
$template->param( pending_checkout_notes => $pending_checkout_notes );
67
65
# Checking if there is a Fast Cataloging Framework
68
# Checking if there is a Fast Cataloging Framework
66
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
69
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
67
70
(-)a/circ/waitingreserves.pl (+5 lines)
Lines 40-45 use Koha::BiblioFrameworks; Link Here
40
use Koha::Items;
40
use Koha::Items;
41
use Koha::ItemTypes;
41
use Koha::ItemTypes;
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
46
Lines 154-159 while ( my $hold = $holds->next ) { Link Here
154
}
155
}
155
156
156
$template->param(cancel_result => \@cancel_result) if @cancel_result;
157
$template->param(cancel_result => \@cancel_result) if @cancel_result;
158
159
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
160
157
$template->param(
161
$template->param(
158
    reserveloop => \@reservloop,
162
    reserveloop => \@reservloop,
159
    reservecount => $reservcount,
163
    reservecount => $reservcount,
Lines 162-167 $template->param( Link Here
162
    show_date   => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }),
166
    show_date   => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }),
163
    ReservesMaxPickUpDelay => $max_pickup_delay,
167
    ReservesMaxPickUpDelay => $max_pickup_delay,
164
    tab => $tab,
168
    tab => $tab,
169
    pending_checkout_notes => $pending_checkout_notes,
165
);
170
);
166
171
167
# Checking if there is a Fast Cataloging Framework
172
# 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