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 150-159 foreach my $num (@getoverdues) { Link Here
150
    push( @overduesloop, \%overdueforbranch );
151
    push( @overduesloop, \%overdueforbranch );
151
}
152
}
152
153
154
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
155
153
# initiate the templates for the overdueloop
156
# initiate the templates for the overdueloop
154
$template->param(
157
$template->param(
155
    overduesloop => \@overduesloop,
158
    overduesloop => \@overduesloop,
156
    location     => $location,
159
    location     => $location,
160
    pending_checkout_notes => $pending_checkout_notes,
157
);
161
);
158
162
159
# Checking if there is a Fast Cataloging Framework
163
# Checking if there is a Fast Cataloging Framework
(-)a/circ/branchtransfers.pl (-1 / +6 lines)
Lines 33-38 use C4::Koha; Link Here
33
use C4::Members;
33
use C4::Members;
34
use Koha::BiblioFrameworks;
34
use Koha::BiblioFrameworks;
35
use Koha::AuthorisedValues;
35
use Koha::AuthorisedValues;
36
use Koha::Checkouts;
36
37
37
###############################################
38
###############################################
38
#  Getting state
39
#  Getting state
Lines 220-225 foreach my $code ( keys %$messages ) { Link Here
220
221
221
# use Data::Dumper;
222
# use Data::Dumper;
222
# warn "FINAL ============= ".Dumper(@trsfitemloop);
223
# warn "FINAL ============= ".Dumper(@trsfitemloop);
224
225
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
226
223
$template->param(
227
$template->param(
224
    found                   => $found,
228
    found                   => $found,
225
    reserved                => $reserved,
229
    reserved                => $reserved,
Lines 234-240 $template->param( Link Here
234
    setwaiting              => $setwaiting,
238
    setwaiting              => $setwaiting,
235
    trsfitemloop            => \@trsfitemloop,
239
    trsfitemloop            => \@trsfitemloop,
236
    errmsgloop              => \@errmsgloop,
240
    errmsgloop              => \@errmsgloop,
237
    CircAutocompl           => C4::Context->preference("CircAutocompl")
241
    CircAutocompl           => C4::Context->preference("CircAutocompl"),
242
    pending_checkout_notes  => $pending_checkout_notes,
238
);
243
);
239
244
240
# Checking if there is a Fast Cataloging Framework
245
# 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' => 'biblio' } ] });
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 54-59 use Koha::Patron::Images; Link Here
54
use Koha::SearchEngine;
54
use Koha::SearchEngine;
55
use Koha::SearchEngine::Search;
55
use Koha::SearchEngine::Search;
56
use Koha::Patron::Modifications;
56
use Koha::Patron::Modifications;
57
use Koha::Checkouts;
57
58
58
use Date::Calc qw(
59
use Date::Calc qw(
59
  Today
60
  Today
Lines 127-132 my ( $template, $loggedinuser, $cookie ) = get_template_and_user ( Link Here
127
    }
128
    }
128
);
129
);
129
130
131
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
132
$template->param( pending_checkout_notes => $pending_checkout_notes );
133
130
my $force_allow_issue = $query->param('forceallow') || 0;
134
my $force_allow_issue = $query->param('forceallow') || 0;
131
if (!C4::Auth::haspermission( C4::Context->userenv->{id} , { circulate => 'force_checkout' } )) {
135
if (!C4::Auth::haspermission( C4::Context->userenv->{id} , { circulate => 'force_checkout' } )) {
132
    $force_allow_issue = 0;
136
    $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-48 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(
47
    pending_checkout_notes   => $pending_checkout_notes,
46
    pending_onsite_checkouts => $pending_onsite_checkouts,
48
    pending_onsite_checkouts => $pending_onsite_checkouts,
47
);
49
);
48
50
(-)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 (+3 lines)
Lines 629-634 foreach ( sort { $a <=> $b } keys %returneditems ) { Link Here
629
    push @riloop, \%ri;
629
    push @riloop, \%ri;
630
}
630
}
631
631
632
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
633
632
$template->param(
634
$template->param(
633
    riloop         => \@riloop,
635
    riloop         => \@riloop,
634
    printer        => $printer,
636
    printer        => $printer,
Lines 640-645 $template->param( Link Here
640
    overduecharges => $overduecharges,
642
    overduecharges => $overduecharges,
641
    AudioAlerts        => C4::Context->preference("AudioAlerts"),
643
    AudioAlerts        => C4::Context->preference("AudioAlerts"),
642
    BlockReturnOfWithdrawnItems => C4::Context->preference("BlockReturnOfWithdrawnItems"),
644
    BlockReturnOfWithdrawnItems => C4::Context->preference("BlockReturnOfWithdrawnItems"),
645
    pending_checkout_notes => $pending_checkout_notes,
643
);
646
);
644
647
645
$itemnumber = GetItemnumberFromBarcode( $barcode );
648
$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 (+4 lines)
Lines 39-44 use Koha::Items; Link Here
39
use Koha::Libraries;
39
use Koha::Libraries;
40
use Koha::DateUtils;
40
use Koha::DateUtils;
41
use Koha::BiblioFrameworks;
41
use Koha::BiblioFrameworks;
42
use Koha::Checkouts;
42
43
43
my $input = new CGI;
44
my $input = new CGI;
44
my $itemnumber = $input->param('itemnumber');
45
my $itemnumber = $input->param('itemnumber');
Lines 120-130 while ( my $library = $libraries->next ) { Link Here
120
    push( @branchesloop, \%branchloop ) if %branchloop;
121
    push( @branchesloop, \%branchloop ) if %branchloop;
121
}
122
}
122
123
124
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
125
123
$template->param(
126
$template->param(
124
    branchesloop => \@branchesloop,
127
    branchesloop => \@branchesloop,
125
    show_date    => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }),
128
    show_date    => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }),
126
	TransfersMaxDaysWarning => C4::Context->preference('TransfersMaxDaysWarning'),
129
	TransfersMaxDaysWarning => C4::Context->preference('TransfersMaxDaysWarning'),
127
	latetransfers => $latetransfers ? 1 : 0,
130
	latetransfers => $latetransfers ? 1 : 0,
131
    pending_checkout_notes => $pending_checkout_notes,
128
);
132
);
129
133
130
# Checking if there is a Fast Cataloging Framework
134
# 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 72-79 while ( my $itemtype = $itemtypes->next ) { Link Here
72
    };
72
    };
73
}
73
}
74
74
75
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
76
75
$template->param( # FIXME Could be improved passing the $itemtypes iterator directly to the template
77
$template->param( # FIXME Could be improved passing the $itemtypes iterator directly to the template
76
   itemtypeloop => \@itemtypesloop,
78
   itemtypeloop => \@itemtypesloop,
79
   pending_checkout_notes => $pending_checkout_notes,
77
);
80
);
78
81
79
# Checking if there is a Fast Cataloging Framework
82
# Checking if there is a Fast Cataloging Framework
(-)a/circ/waitingreserves.pl (+5 lines)
Lines 37-42 use C4::Reserves; Link Here
37
use C4::Koha;
37
use C4::Koha;
38
use Koha::DateUtils;
38
use Koha::DateUtils;
39
use Koha::BiblioFrameworks;
39
use Koha::BiblioFrameworks;
40
use Koha::Checkouts;
40
41
41
my $input = new CGI;
42
my $input = new CGI;
42
43
Lines 149-154 foreach my $num (@getreserves) { 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 (+4 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 %]</a></span>[% END %]</li>
38
            [% END %]
39
36
        </ul>
40
        </ul>
37
41
38
        <h5>Circulation reports</h5>
42
        <h5>Circulation reports</h5>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/checkout-notes.tt (-15 / +26 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 128-147 Link Here
128
                [% FOREACH note IN notes %]
129
                [% FOREACH note IN notes %]
129
                    <tr>
130
                    <tr>
130
                        <td><input type="checkbox" name="issue_ids" value="[% note.issue_id %]"></td>
131
                        <td><input type="checkbox" name="issue_ids" value="[% note.issue_id %]"></td>
131
                        <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>
132
                        <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>
132
                        <td>[% note.note %]</td>
133
                        <td>[% note.note %]</td>
133
                        <td>[% note.notedate | $KohaDates %]</td>
134
                        <td>[% note.notedate | $KohaDates %]</td>
134
                        <td>[% note.borrower.firstname %] [% note.borrower.surname %] (<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% note.borrower.borrowernumber %]">[% note.borrower.cardnumber %]</a>)</td>
135
                        <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>
135
                        <td>[% IF ( note.noteseen == 0 ) %]
136
                        <td>
136
                            <span id="status_[% note.issue_id %]">Not seen</span>
137
                            [% IF ( note.noteseen == 0 ) %]
137
                        [% ELSIF ( note.noteseen == 1 ) %]
138
                                <span id="status_[% note.issue_id %]">Not seen</span>
138
                            <span id="status_[% note.issue_id %]">Seen</span>
139
                            [% ELSIF ( note.noteseen == 1 ) %]
139
                        [% END %]</td>
140
                                <span id="status_[% note.issue_id %]">Seen</span>
140
                        <td class="actions">[% IF ( note.noteseen == 1 ) %]
141
                            [% END %]
141
                            <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>
142
                        </td>
142
                        [% ELSIF ( note.noteseen == 0 ) %]
143
                        <td class="actions">
143
                            <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>
144
                            [% IF ( note.noteseen == 1 ) %]
144
                        [% END %]</td>
145
                                <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>
146
                            [% ELSIF ( note.noteseen == 0 ) %]
147
                                <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>
148
                            [% END %]
149
                        </td>
145
                    </tr>
150
                    </tr>
146
                [% END %]
151
                [% END %]
147
                </tbody>
152
                </tbody>
Lines 158-164 Link Here
158
163
159
            [% END %] <!-- selected_count -->
164
            [% END %] <!-- selected_count -->
160
165
161
        </div> <!-- yui-main -->
166
            </div> <!-- yui-main -->
167
168
        [% IF Koha.Preference('CircSidebar') %]
169
        </div>
170
        <div class="yui-b noprint">
171
            [% INCLUDE 'circ-nav.inc' %]
172
        </div>
173
        [% END %]
162
    </div> <!-- bd -->
174
    </div> <!-- bd -->
163
</div> <!-- doc3 -->
175
</div> <!-- doc3 -->
164
176
165
- 

Return to bug 17698