diff --git a/circ/checkout-notes.pl b/circ/checkout-notes.pl index b0638f4525..5bad39a4bf 100755 --- a/circ/checkout-notes.pl +++ b/circ/checkout-notes.pl @@ -38,11 +38,9 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( ); my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count; -my @notes = Koha::Checkouts->search({ 'me.note' => { '!=', undef } }, { prefetch => [ 'borrower', { item => 'biblionumber' } ] }); $template->param( pending_checkout_notes => $pending_checkout_notes, - notes => \@notes, ); my $action; @@ -65,9 +63,11 @@ if ( $action eq 'seen' ) { } } +my $notes = Koha::Checkouts->search({ 'me.note' => { '!=', undef } }, { prefetch => [ 'borrower', { item => 'biblionumber' } ] }); $template->param( selected_count => scalar(@issue_ids), action => $action, + notes => $notes, ); output_html_with_http_headers $query, $cookie, $template->output; diff --git a/installer/data/mysql/atomicupdate/bug-17698_add-permission-to-manage-checkout-notes.sql b/installer/data/mysql/atomicupdate/bug-17698_add-permission-to-manage-checkout-notes.sql index 86d4351d1f..ce3bd8f373 100644 --- a/installer/data/mysql/atomicupdate/bug-17698_add-permission-to-manage-checkout-notes.sql +++ b/installer/data/mysql/atomicupdate/bug-17698_add-permission-to-manage-checkout-notes.sql @@ -1 +1 @@ -INSERT INTO permissions (module_bit, code, description) VALUES ( 1, 'manage_checkout_notes', 'Mark checkout notes as seen/not seen'); +INSERT IGNORE INTO permissions (module_bit, code, description) VALUES ( 1, 'manage_checkout_notes', 'Mark checkout notes as seen/not seen'); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/checkout-notes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/checkout-notes.tt index 05533e734a..cd02e65612 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/checkout-notes.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/checkout-notes.tt @@ -28,72 +28,71 @@ [% IF ( selected_count ) %]
- Return to checkout notes - [% ELSE %] + [% END %] + + [% IF ( notes.count ) %] + + + -| - | Title | -Note | -Date | -Set by | -Status | -Actions | -
|---|---|---|---|---|---|---|
| - | [% note.item.biblio.title %] - [% note.item.biblio.author %] ([% note.item.barcode %]) | -[% note.note %] | -[% note.notedate | $KohaDates %] | -[% IF note.patron.title %][% note.patron.title %] [% END %][% note.patron.firstname %] [% note.patron.surname %] ([% note.patron.cardnumber %]) | -- [% IF ( note.noteseen == 0 ) %] - Not seen - [% ELSIF ( note.noteseen == 1 ) %] - Seen - [% END %] - | -- [% IF ( note.noteseen == 1 ) %] - - [% ELSIF ( note.noteseen == 0 ) %] - - [% END %] - | -