Bugzilla – Attachment 76011 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: (QA follow-up) Fix minors design issues
Bug-17698-QA-follow-up-Fix-minors-design-issues.patch (text/plain), 12.71 KB, created by
Jonathan Druart
on 2018-06-12 20:04:28 UTC
(
hide
)
Description:
Bug 17698: (QA follow-up) Fix minors design issues
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-06-12 20:04:28 UTC
Size:
12.71 KB
patch
obsolete
>From fcba4fed0dfc0455bc4045d62ede138f408410c2 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 12 Jun 2018 17:02:30 -0300 >Subject: [PATCH] Bug 17698: (QA follow-up) Fix minors design issues > >This patch includes some changes required on comment 57: > >1. Bad resolution conflict, permission self_checkout is re-add > >2. The IGNORE modifier is missing in the INSERT statement > >4. When I hit /circ/checkout-notes.pl from the side bar, the page displays "Checkout notes", nothing else. We should add "There is no checkout notes". > >7. I would display the table on the confirmation screen as well > >10. html filters are missing > >11. span element should surround translatable string, to help translators > >14. patron-title.inc must be used to display patron's info >--- > circ/checkout-notes.pl | 4 +- > ...698_add-permission-to-manage-checkout-notes.sql | 2 +- > installer/data/mysql/userpermissions.sql | 1 - > .../prog/en/modules/circ/checkout-notes.tt | 113 ++++++++++----------- > 4 files changed, 59 insertions(+), 61 deletions(-) > >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/installer/data/mysql/userpermissions.sql b/installer/data/mysql/userpermissions.sql >index e61c91f41f..d12241edc1 100644 >--- a/installer/data/mysql/userpermissions.sql >+++ b/installer/data/mysql/userpermissions.sql >@@ -4,7 +4,6 @@ INSERT INTO permissions (module_bit, code, description) VALUES > ( 1, 'overdues_report', 'Execute overdue items report'), > ( 1, 'force_checkout', 'Force checkout if a limitation exists'), > ( 1, 'manage_restrictions', 'Manage restrictions for accounts'), >- ( 1, 'self_checkout', 'Perform self checkout at the OPAC. It should be used for the patron matching the AutoSelfCheckID'), > ( 1, 'manage_checkout_notes', 'Mark checkout notes as seen/not seen'), > ( 3, 'parameters_remaining_permissions', 'Remaining system parameters permissions'), > ( 3, 'manage_circ_rules', 'Manage circulation rules'), >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 ) %] > <div class="dialog message"> > [% IF ( action == 'seen' ) %] >- [% selected_count %] note(s) marked as seen. >+ <span>[% selected_count %] note(s) marked as seen.</span> > [% ELSIF ( action == 'notseen' ) %] >- [% selected_count %] note(s) marked as not seen. >+ <span>[% selected_count %] note(s) marked as not seen.</span> > [% ELSE %] >- Failed to change the status of [% selected_count %] item(s). >+ <span>Failed to change the status of [% selected_count %] item(s).</span> > [% END %] > </div> >- <a href="/cgi-bin/koha/circ/checkout-notes.pl" class="btn btn-default btn-sm"><i class="fa fa-left"></i> Return to checkout notes</a> >- [% ELSE %] >+ [% 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> >+ >+ <form id="mark_selected" method="post" action="/cgi-bin/koha/circ/checkout-notes.pl"> >+ >+ <table id="notestable"> >+ <thead> >+ <tr> >+ <th> </th> >+ <th>Title</th> >+ <th>Note</th> >+ <th>Date</th> >+ <th>Set by</th> >+ <th>Status</th> >+ <th>Actions</th> >+ </tr> >+ </thead> >+ <tbody> >+ [% FOREACH note IN notes %] >+ <tr> >+ <td><input type="checkbox" name="issue_ids" value="[% note.issue_id %]"></td> >+ <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> >+ <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> >+ [% IF ( note.noteseen == 0 ) %] >+ <span id="status_[% note.issue_id %]">Not seen</span> >+ [% ELSIF ( note.noteseen == 1 ) %] >+ <span id="status_[% note.issue_id %]">Seen</span> >+ [% END %] >+ </td> >+ <td class="actions"> >+ [% IF ( note.noteseen == 1 ) %] >+ <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> >+ [% ELSIF ( note.noteseen == 0 ) %] >+ <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> >+ [% END %] >+ </td> >+ </tr> >+ [% END %] >+ </tbody> >+ </table> > >- [% IF ( notes ) %] > <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> >+ <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 id="mark_selected" method="post" action="/cgi-bin/koha/circ/checkout-notes.pl"> >+ </form> > >- <table id="notestable"> >- <thead> >- <tr> >- <th> </th> >- <th>Title</th> >- <th>Note</th> >- <th>Date</th> >- <th>Set by</th> >- <th>Status</th> >- <th>Actions</th> >- </tr> >- </thead> >- <tbody> >- [% FOREACH note IN notes %] >- <tr> >- <td><input type="checkbox" name="issue_ids" value="[% note.issue_id %]"></td> >- <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> >- <td>[% note.note %]</td> >- <td>[% note.notedate | $KohaDates %]</td> >- <td>[% IF note.patron.title %][% note.patron.title %] [% END %][% note.patron.firstname %] [% note.patron.surname %] (<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% note.patron.borrowernumber %]">[% note.patron.cardnumber %]</a>)</td> >- <td> >- [% IF ( note.noteseen == 0 ) %] >- <span id="status_[% note.issue_id %]">Not seen</span> >- [% ELSIF ( note.noteseen == 1 ) %] >- <span id="status_[% note.issue_id %]">Seen</span> >- [% END %] >- </td> >- <td class="actions"> >- [% IF ( note.noteseen == 1 ) %] >- <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> >- [% ELSIF ( note.noteseen == 0 ) %] >- <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> >- [% END %] >- </td> >- </tr> >- [% END %] >- </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> >- >- [% END %] <!-- notes --> >- >- [% END %] <!-- selected_count --> >+ [% ELSE %] >+ <span>There are currently no checkout notes.</span> >+ [% END %] <!-- notes --> > > </div> <!-- yui-main --> > >-- >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