Bugzilla – Attachment 76031 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 some small issues
Bug-17698-follow-up-Fixing-some-small-issues.patch (text/plain), 11.72 KB, created by
Jonathan Druart
on 2018-06-13 15:24:06 UTC
(
hide
)
Description:
Bug 17698: (follow-up) Fixing some small issues
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-06-13 15:24:06 UTC
Size:
11.72 KB
patch
obsolete
>From c47cae0b1363a62ccaa9c0ee4f61a26a3da4188d Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Thu, 12 Apr 2018 04:04:48 +0000 >Subject: [PATCH] Bug 17698: (follow-up) Fixing some small issues > >Fixing the comments in Comment 42 > >Ready to test > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > circ/on-site_checkouts.pl | 2 +- > ...698_add-permission-to-manage-checkout-notes.sql | 2 +- > installer/data/mysql/userpermissions.sql | 2 +- > .../prog/en/modules/circ/checkout-notes.tt | 146 +++++++++++---------- > .../intranet-tmpl/prog/en/modules/intranet-main.tt | 2 +- > 5 files changed, 79 insertions(+), 75 deletions(-) > >diff --git a/circ/on-site_checkouts.pl b/circ/on-site_checkouts.pl >index bcf78cc5b5..05eef2c71c 100755 >--- a/circ/on-site_checkouts.pl >+++ b/circ/on-site_checkouts.pl >@@ -45,7 +45,7 @@ my $pending_onsite_checkouts = C4::Circulation::GetPendingOnSiteCheckouts(); > > $template->param( > pending_onsite_checkouts => $pending_onsite_checkouts, >- pending_onsite_notes => $pending_onsite_notes, >+ pending_checkout_notes => $pending_checkout_notes, > ); > > output_html_with_http_headers $cgi, $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 343314bc6f..86d4351d1f 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_nots', 'Mark checkout notes as seen/not seen'); >+INSERT 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 0a0d9f74d3..d12241edc1 100644 >--- a/installer/data/mysql/userpermissions.sql >+++ b/installer/data/mysql/userpermissions.sql >@@ -4,7 +4,7 @@ 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, 'manage_checkout_nots', 'Mark checkout notes as seen/not seen'), >+ ( 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'), > ( 4, 'edit_borrowers', 'Add, modify and view patron information'), >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 62c087d80c..3ec45f9cd5 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 >@@ -1,79 +1,11 @@ > [% USE Koha %] > [% USE KohaDates %] > [% USE Branches %] >+[% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] >-<title>Home › Circulation › Checkout Notes</title> >+<title>Home › Circulation › Checkout notes</title> > [% INCLUDE 'doc-head-close.inc' %] > <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> >-[% INCLUDE 'datatables.inc' %] >-<script type="text/javascript"> >-//<![CDATA[ >- $(document).ready(function(){ >- $("#notestable").dataTable($.extend(true, {}, dataTablesDefaults, { >- "aoColumnDefs": [ >- { "aTargets": [ 0, -1 ], "bSearchable": false, "bSortable": false }, >- ], >- "sPaginationType": "four_button" >- })); >- >- $(".SelectAll").on("click", function(){ >- $("input[name='issue_ids'][type='checkbox']").prop("checked", true); >- $(".btn-sm").prop("disabled", false); >- }); >- >- $(".ClearAll").on("click", function(){ >- $("input[name='issue_ids'][type='checkbox']").prop("checked", false); >- $(".btn-sm").prop("disabled", true); >- }); >- >- $("#error").hide(); >- >- $("input[type='checkbox']").click(function(event){ >- if ( $("input[type='checkbox']").is(":checked") ) { >- $(".btn-sm").prop("disabled", false); >- } else { >- $(".btn-sm").prop("disabled", true); >- } >- }); >- >- $(".btn-xs").click(function(event){ >- event.preventDefault(); // prevent form submission >- var $action = $(this).attr("name"); >- var $issue_id = $(this).data('issue_id'); >- var ajaxData = { >- 'action': $action, >- 'issue_id': $issue_id, >- }; >- >- $.ajax({ >- url: '/cgi-bin/koha/svc/checkout_notes/', >- type: 'POST', >- dataType: 'json', >- data: ajaxData, >- }) >- >- .done(function(data){ >- if (data.status == 'success'){ >- if ( $action == 'notseen' ){ >- $("#status_" + $issue_id).text("Not seen"); >- $(event.target).siblings(".seen").prop("disabled", false); >- $(event.target).prop("disabled", true); >- } else { >- $("#status_" + $issue_id).text("Seen"); >- $(event.target).siblings(".notseen").prop("disabled", false); >- $(event.target).prop("disabled", true); >- } >- } else { >- $("#error").text(_("Unable to change status of note.")); >- $("#error").show(); >- } >- }); >- }); >- }); >-//]]> >-</script> >-[% INCLUDE 'calendar.inc' %] >-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> > </head> > [% INCLUDE 'header.inc' %] > [% INCLUDE 'circ-search.inc' %] >@@ -131,7 +63,7 @@ > <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.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> >@@ -175,4 +107,76 @@ > </div> <!-- bd --> > </div> <!-- doc3 --> > >+[% MACRO jsinclude BLOCK %] >+ <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script> >+ [% INCLUDE 'calendar.inc' %] >+ [% INCLUDE 'datatables.inc' %] >+ <script type="text/javascript"> >+ //<![CDATA[ >+ $(document).ready(function(){ >+ $("#notestable").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "aoColumnDefs": [ >+ { "aTargets": [ 0, -1 ], "bSearchable": false, "bSortable": false }, >+ ], >+ "sPaginationType": "four_button" >+ })); >+ >+ $(".SelectAll").on("click", function(){ >+ $("input[name='issue_ids'][type='checkbox']").prop("checked", true); >+ $(".btn-sm").prop("disabled", false); >+ }); >+ >+ $(".ClearAll").on("click", function(){ >+ $("input[name='issue_ids'][type='checkbox']").prop("checked", false); >+ $(".btn-sm").prop("disabled", true); >+ }); >+ >+ $("#error").hide(); >+ >+ $("input[type='checkbox']").click(function(event){ >+ if ( $("input[type='checkbox']").is(":checked") ) { >+ $(".btn-sm").prop("disabled", false); >+ } else { >+ $(".btn-sm").prop("disabled", true); >+ } >+ }); >+ >+ $(".btn-xs").click(function(event){ >+ event.preventDefault(); // prevent form submission >+ var $action = $(this).attr("name"); >+ var $issue_id = $(this).data('issue_id'); >+ var ajaxData = { >+ 'action': $action, >+ 'issue_id': $issue_id, >+ }; >+ >+ $.ajax({ >+ url: '/cgi-bin/koha/svc/checkout_notes/', >+ type: 'POST', >+ dataType: 'json', >+ data: ajaxData, >+ }) >+ >+ .done(function(data){ >+ if (data.status == 'success'){ >+ if ( $action == 'notseen' ){ >+ $("#status_" + $issue_id).text(_("Not seen")); >+ $(event.target).siblings(".seen").prop("disabled", false); >+ $(event.target).prop("disabled", true); >+ } else { >+ $("#status_" + $issue_id).text(_("Seen")); >+ $(event.target).siblings(".notseen").prop("disabled", false); >+ $(event.target).prop("disabled", true); >+ } >+ } else { >+ $("#error").text(_("Unable to change status of note.")); >+ $("#error").show(); >+ } >+ }); >+ }); >+ }); >+ //]]> >+ </script> >+[% END %] >+ > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >index 59cc74698b..55048c0b84 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >@@ -125,7 +125,7 @@ > <div class="row"> > <div class="col-sm-12"> > [%# Following statement must be in one line for translatability %] >- [% IF ( ( CAN_user_tools_moderate_comments && pendingcomments ) || ( CAN_user_tools_moderate_tags && pendingtags ) || ( CAN_user_borrowers_edit_borrowers && pending_borrower_modifications ) || ( CAN_user_acquisition && pendingsuggestions ) || ( CAN_user_borrowers_edit_borrowers && pending_discharge_requests ) || pending_article_requests) %] >+ [% IF ( ( CAN_user_tools_moderate_comments && pendingcomments ) || ( CAN_user_tools_moderate_tags && pendingtags ) || ( CAN_user_borrowers_edit_borrowers && pending_borrower_modifications ) || ( CAN_user_acquisition && pendingsuggestions ) || ( CAN_user_borrowers_edit_borrowers && pending_discharge_requests ) || pending_article_requests) || ( Koha.Preference('AllowCheckoutNotes') && CAN_user_circulate_manage_checkout_notes && pending_checkout_notes ) %] > <div id="area-pending"> > [% IF pending_article_requests %] > <div class="pending-info" id="article_requests_pending"> >-- >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