From aebc7a0994086f9c5f5aea834642d3305cfd27bc Mon Sep 17 00:00:00 2001 From: Liz Rea Date: Wed, 13 Dec 2017 15:14:58 +1300 Subject: [PATCH] Bug 19801 - Display messages on user details page as well as on Check Out page To test: Look up a borrower, add a message (internal or opac) Click the Details tab for that borrower Messages should be displayed above the user information [is this the right place? it could go below] adding messages on this page should make them immediately available deleting messages on this page should delete them immediately and bring you back to the detail page. Basically, make sure messages work from both the Check out and detail pages and that there are no typos. Messages should work the same as they always have from the Check Out page. sponsored-by: Catalyst IT --- circ/del_message.pl | 9 +++++-- .../prog/en/modules/members/moremember.tt | 28 ++++++++++++++++++++-- members/moremember.pl | 14 +++++++++++ 3 files changed, 47 insertions(+), 4 deletions(-) diff --git a/circ/del_message.pl b/circ/del_message.pl index ccce661..d7cf91c 100755 --- a/circ/del_message.pl +++ b/circ/del_message.pl @@ -43,5 +43,10 @@ my $message_id = $input->param('message_id'); my $message = Koha::Patron::Messages->find($message_id); $message->delete if $message; -print $input->redirect( - "/cgi-bin/koha/circ/circulation.pl?borrowernumber=$borrowernumber"); +if ( $input->param('from') == "moremember" ) { + print $input->redirect( + "/cgi-bin/koha/members/moremember.pl?borrowernumber=$borrowernumber"); +} else { + print $input->redirect( + "/cgi-bin/koha/circ/circulation.pl?borrowernumber=$borrowernumber"); +} diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index 83e964a..f15ea7b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -41,6 +41,7 @@ var relatives_borrowernumbers = new Array(); [% END %] var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export"); +var MSG_CONFIRM_DELETE_MESSAGE = _("Are you sure you want to delete this message? This cannot be undone."); columns_settings = [% ColumnsSettings.GetColumns( 'members', 'moremember', 'issues-table', 'json' ) %] @@ -190,6 +191,31 @@ function validate1(date) { [% END %] +
+

Messages:

+ + Add a new message +
[% IF ( flagged ) %]
@@ -217,7 +243,6 @@ function validate1(date) {
[% END %] -

[% UNLESS ( I ) %] [% title | html %] [% firstname | html %] [% END %] [% surname | html %] ([% cardnumber | html %])

@@ -500,7 +525,6 @@ function validate1(date) {
-