Bugzilla – Attachment 76035 Details for
Bug 17698
Make patron notes show up on staff dashboard
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17698: (follow-up) Fixing things in Comment 57
Bug-17698-follow-up-Fixing-things-in-Comment-57.patch (text/plain), 8.17 KB, created by
Jonathan Druart
on 2018-06-13 15:24:31 UTC
(
hide
)
Description:
Bug 17698: (follow-up) Fixing things in Comment 57
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-06-13 15:24:31 UTC
Size:
8.17 KB
patch
obsolete
>From 7d31ee14bb7d96d016151b18e16afa5879aef972 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Tue, 12 Jun 2018 23:10:24 +0000 >Subject: [PATCH] Bug 17698: (follow-up) Fixing things in Comment 57 > >3. In the JS console: "ReferenceError: $ is not defined", I did not >investigate it. > >Where do you see this in the console? I cannot recreate on opac-user.pl >or on circ/checkout-notes.pl. > >5. The alert id=error is displayed then hide in JS, but it's then >displayed half a second. We should hide it by default (css) > >Fixed in this patch > >6. I would move the "mark seen" and "mark not seen" buttons at the >top of the table > >Fixed in this patch > >8. Cursor on "Select all" and "Clear all" links must be adjusted > >Fixed in this patch > >9. $(".btn-xs").click(function(event){ >The selector should be $("button.seen, button.notseen"), you >do not want to apply this function to all other btn-xs on >the page (maybe there are only two for now, but who knows >later?) > >Fixed in this patch > >12. Important: When a note is updated, it's still marked as >seen. Is it the expected behavior? > >I don't see this behaviour. When a note is updated it is >marked as not seen. >opav/svc/checkout_notes:79: $issue->set({ notedate => >dt_from_string(), note => $clean_note, noteseen => 0 >})->store; > >13. What will happen when hundred of notes will be on this >table? Not blocker but we will need a "hide seen" buttons to >filters the already seen notes. > >Added in this patch > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > 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(-) > >diff --git a/circ/circulation-home.pl b/circ/circulation-home.pl >index f101f6dd8c..1d08a03f84 100755 >--- a/circ/circulation-home.pl >+++ b/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; >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 cd02e65612..ae954ca131 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 >@@ -23,7 +23,7 @@ > > <h1>Checkout notes</h1> > >- <div class="dialog alert" id="error"></div> >+ <div class="dialog alert" id="error" style="display:none;"></div> > > [% IF ( selected_count ) %] > <div class="dialog message"> >@@ -38,12 +38,20 @@ > [% END %] > > [% IF ( notes.count ) %] >- <fieldset class="action"> >- <a class="SelectAll"><i class="fa fa-check"></i> Select all</a> | <a class="ClearAll"><i class="fa fa-remove"></i> Clear all</a> >+ <fieldset class="action" style="cursor:pointer;"> >+ <a class="SelectAll"><i class="fa fa-check"></i> Select all</a> >+ | <a class="ClearAll"><i class="fa fa-remove"></i> Clear all</a> >+ | <a class="HideSeen"><i class="fa fa-minus-square"></i> Hide seen</a> >+ | <a class="ShowAll"><i class="fa fa-bars"></i> Show all</a> > </fieldset> > > <form id="mark_selected" method="post" action="/cgi-bin/koha/circ/checkout-notes.pl"> > >+ <fieldset class="action"> >+ <button type="submit" class="btn btn-default btn-sm" name="mark_selected-seen" value="seen" disabled="disabled"><i class="fa fa-eye"></i> Mark seen</button> >+ <button type="submit" class="btn btn-default btn-sm" name="mark_selected-notseen" value="notseen" disabled="disabled"><i class="fa fa-eye-slash"></i> Mark not seen</button> >+ </fieldset> >+ > <table id="notestable"> > <thead> > <tr> >@@ -64,7 +72,7 @@ > <td>[% note.note | html %]</td> > <td>[% note.notedate | $KohaDates %]</td> > <td>[% INCLUDE 'patron-title.inc' patron => note.patron hide_patron_infos_if_needed=1 %]</td> >- <td> >+ <td class="seen[% note.noteseen %]"> > [% IF ( note.noteseen == 0 ) %] > <span id="status_[% note.issue_id %]">Not seen</span> > [% ELSIF ( note.noteseen == 1 ) %] >@@ -83,11 +91,6 @@ > </tbody> > </table> > >- <fieldset class="action"> >- <button type="submit" class="btn btn-default btn-sm" name="mark_selected-seen" value="seen" disabled="disabled"><i class="fa fa-eye"></i> Mark seen</button> >- <button type="submit" class="btn btn-default btn-sm" name="mark_selected-notseen" value="notseen" disabled="disabled"><i class="fa fa-eye-slash"></i> Mark not seen</button> >- </fieldset> >- > </form> > > [% 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); > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt >index 56450bc97d..0ba1d43d74 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt >+++ b/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 ) %] > <li> >- <a class="circ-button" href="/cgi-bin/koha/circ/checkout-notes.pl"><i class="fa fa-sticky-note"></i> 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 %] >+ <a class="circ-button" href="/cgi-bin/koha/circ/checkout-notes.pl"><i class="fa fa-sticky-note"></i> Checkout notes</a> > </li> > [% END %] > </ul> >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17698
:
57851
|
58779
|
58780
|
58786
|
59480
|
59638
|
59762
|
59778
|
59809
|
59828
|
59829
|
59957
|
61857
|
62337
|
62351
|
64662
|
64683
|
64835
|
71100
|
71126
|
71127
|
72875
|
72876
|
72877
|
73004
|
73005
|
73006
|
73839
|
73840
|
73841
|
74044
|
74193
|
75837
|
75838
|
75839
|
75840
|
75841
|
75842
|
76011
|
76012
|
76028
|
76029
|
76030
|
76031
|
76032
|
76033
|
76034
| 76035 |
76036
|
76037
|
89964
|
90037