From 7e5f6ee993f680c25a84462b252d4acb9decea4f Mon Sep 17 00:00:00 2001 From: Aleisha Date: Thu, 24 Mar 2016 00:28:42 +0000 Subject: [PATCH] Bug 3669: Moving 'Add a new message' into a pop up box and adding to patron toolbar This patch moves all the code into an include which can be accessed from the 'Add a new message' link or the patron toolbar. EDIT: Ensuring modal opens on all pages To test: 1) Go to a patron circ page (circ/circulation.pl?borrowernumber=X) 2) Click 'Add a new message' under Messages 3) Confirm this brings up the modal to add a message. Confirm clicking Save saves your message. If it is an OPAC message (for the user), confirm it shows as expected on the OPAC. 4) Click Cancel. Confirm this closes the modal. 5) Click 'Add message' button in toolbar. Complete steps 3 and 4. 6) Confirm the modal opens from all other pages with the members toolbar (ie Details, Fines etc) Sponsored-by: Catalyst IT --- .../prog/en/includes/member-add-message.inc | 32 ++++++++++++ .../prog/en/includes/members-toolbar.inc | 15 ++++++ .../prog/en/modules/circ/circulation.tt | 51 +++++--------------- 3 files changed, 60 insertions(+), 38 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/member-add-message.inc diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-add-message.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-add-message.inc new file mode 100644 index 0000000..f18ec0d --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/member-add-message.inc @@ -0,0 +1,32 @@ +[% USE Koha %] + +
+
+Leave a message +
    +
  1. + + +
  2. + [% IF ( canned_bor_notes_loop ) %] +
  3. + + +
  4. + [% END %] +
  5. + +
  6. +
+ + + +
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc index 9ecce10..bbd9842 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc @@ -170,6 +170,8 @@ function searchToHold(){ Search to hold [% END %] + Add message +
+ + +
+ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index 0efe49b..06ee5cb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -45,7 +45,6 @@ var relatives_borrowernumbers = new Array(); relatives_borrowernumbers.push("[% b %]"); [% END %] -var MSG_ADD_MESSAGE = _("Add a new message"); var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export"); columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'issues-table', 'json' ) %] @@ -154,43 +153,6 @@ $(document).ready(function() { [% END %] - - [% IF ( was_renewed ) %]
Patron's account has been renewed until [% expiry | $KohaDates %]
[% END %] [% IF additional_materials %] @@ -854,6 +816,19 @@ No patron matched [% message %] [% END %] [% END %] + Add a new message + + + -- 1.7.10.4