@@ -, +, @@ --- circ/circulation-home.pl | 3 -- .../prog/en/modules/circ/checkout-notes.tt | 33 +++++++++++++++------- .../prog/en/modules/circ/circulation-home.tt | 2 +- 3 files changed, 24 insertions(+), 14 deletions(-) --- a/circ/circulation-home.pl +++ a/circ/circulation-home.pl @@ -40,7 +40,4 @@ $template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' ) $template->{'VARS'}->{'AllowOfflineCirculation'} = C4::Context->preference('AllowOfflineCirculation'); -my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count; -$template->param( pending_checkout_notes => $pending_checkout_notes ); - output_html_with_http_headers $query, $cookie, $template->output; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/checkout-notes.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/checkout-notes.tt @@ -23,7 +23,7 @@

Checkout notes

-
+ [% IF ( selected_count ) %]
@@ -38,12 +38,20 @@ [% END %] [% IF ( notes.count ) %] -
- Select all | Clear all +
+ Select all + | Clear all + | Hide seen + | Show all
+
+ + +
+ @@ -64,7 +72,7 @@ -
[% note.note | html %] [% note.notedate | $KohaDates %] [% INCLUDE 'patron-title.inc' patron => note.patron hide_patron_infos_if_needed=1 %] + [% IF ( note.noteseen == 0 ) %] Not seen [% ELSIF ( note.noteseen == 1 ) %] @@ -83,11 +91,6 @@
-
- - -
-
[% ELSE %] @@ -131,6 +134,14 @@ $(".btn-sm").prop("disabled", true); }); + $(".HideSeen").on("click", function(){ + $(".seen1").parent().hide(); + }); + + $(".ShowAll").on("click", function(){ + $("tr").show(); + }); + $("#error").hide(); $("input[type='checkbox']").click(function(event){ @@ -141,7 +152,7 @@ } }); - $(".btn-xs").click(function(event){ + $("button.seen, button.notseen").click(function(event){ event.preventDefault(); // prevent form submission var $action = $(this).attr("name"); var $issue_id = $(this).data('issue_id'); @@ -161,10 +172,12 @@ if (data.status == 'success'){ if ( $action == 'notseen' ){ $("#status_" + $issue_id).text(_("Not seen")); + $(event.target).parent().siblings(".seen1").removeClass("seen1").addClass("seen0"); $(event.target).siblings(".seen").prop("disabled", false); $(event.target).prop("disabled", true); } else { $("#status_" + $issue_id).text(_("Seen")); + $(event.target).parent().siblings(".seen0").removeClass("seen0").addClass("seen1"); $(event.target).siblings(".notseen").prop("disabled", false); $(event.target).prop("disabled", true); } --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt @@ -41,7 +41,7 @@ [% END %] [% IF ( Koha.Preference('AllowCheckoutNotes') && CAN_user_circulate_manage_checkout_notes ) %]
  • - Checkout notes [% IF ( pending_checkout_notes ) %][% pending_checkout_notes %][% END %] + Checkout notes
  • [% END %] --