From 420169e1a15871c5fe48e02e179301d949583487 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 2 Jun 2016 13:00:22 -0400 Subject: [PATCH] Bug 16640 - Move actions on acquisitions receipt summary page into menu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch moves two groups of links into two menus: MARC and Card preview into one, Receive, transfer, cancel, etc. into another. Also changed: The transfer order pop-up window has been sized down to be more consistent with other similar pop-ups. Baskets and basket group links now include the whole name rather than just the number to make it easier to click. To test you must have a basket or baskets with multiple titles on order, both received and pending. - Apply the patch and go to Acquisitions -> Vendor -> Receive shipment -> Receive a new shipment (or open an existing invoice). - In the list of pending orders: - Test the 'View' menu for multiple titles. The 'MARC' and 'Card' menu items should work correctly. - Test the 'Actions' menu for the following actions: - Receive - Transfer - Cancel order - Cancel order and delete catalog record - Confirm that under some circumstances the 'Cancel order' and 'Cancel order and delete catalog record' items are disabled. In these cases hovering over the menu items should trigger a tooltip. An explanation should be displayed in red at the bottom of the menu. Clicking the menu item should trigger an alert with the explanation. Followed test plan, works as expected. Signed-off-by: Marc Véron Signed-off-by: Kyle M Hall --- .../intranet-tmpl/prog/en/modules/acqui/parcel.tt | 174 ++++++++++++++------- 1 file changed, 119 insertions(+), 55 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt index c66f2f2..59c570b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -117,6 +117,13 @@ $("#dataPreview .modal-body").html("
\"\" "+_("Loading")+"
"); }); + $("li.disabled a,li.message a").on("click",function(e){ + e.preventDefault(); + var ordernumber = $(this).data("ordernumber"); + if( ordernumber ){ + showErrors( ordernumber ); + } + }).tooltip(); }); // Case-insensitive version of jquery's contains function @@ -129,18 +136,40 @@ containsExactly: "$(a).text() == m[3]" }); -//]]> - - + [% INCLUDE 'header.inc' %] @@ -257,15 +286,15 @@ [% FOREACH loop_order IN loop_orders %] - [% loop_order.basketname %] ([% loop_order.basketno %]) + [% loop_order.basketname %] ([% loop_order.basketno %]) [% IF loop_order.basketgroupid %] - [% loop_order.basketgroupname %] ([% loop_order.basketgroupid %]) + [% loop_order.basketgroupname %] ([% loop_order.basketgroupid %]) [% ELSE %] No basket group [% END %] - [% loop_order.ordernumber %] + Order line [% loop_order.ordernumber %] [% loop_order.title |html %] [% IF ( loop_order.author ) %] by [% loop_order.author %][% END %] @@ -288,41 +317,64 @@ [Add vendor note] [% END %] - MARC | Card + +
+ + View + + +
+ [% loop_order.quantity %] [% loop_order.ecost | $Price %] [% loop_order.total | $Price %] [% loop_order.budget_name %] - - Receive -
- Transfer - - - [% IF ( loop_order.left_holds_on_order ) %] - Can't cancel order
- [% ELSE %] - Cancel order
- [% END %] - [% IF ( loop_order.can_del_bib ) %] - Cancel order and catalog record
- [% ELSE %] - Can't cancel order and delete catalog record
- [% END %] - [% IF ( loop_order.left_item ) %] - [% loop_order.items %] item(s) left
- [% END %] - [% IF ( loop_order.left_biblio ) %] - [% loop_order.biblios %] order(s) left
- [% END %] - [% IF ( loop_order.left_subscription ) %] - [% loop_order.subscriptions %] subscription(s) left
- [% END %] - [% IF ( loop_order.left_holds ) %] - [% loop_order.holds %] hold(s) left - [% END %] - - + +
+ + Actions + + +
+ + +   + [% END %] @@ -393,16 +445,16 @@ [% FOREACH order IN loop_received %] - [% order.basketname %] ([% order.basketno %]) + [% order.basketname %] ([% order.basketno %]) [% IF order.basketgroupid %] - [% order.basketgroupname %] ([% order.basketgroupid %]) + [% order.basketgroupname %] ([% order.basketgroupid %]) [% ELSE %] No basket group [% END %] - [% order.ordernumber %] + Order line [% order.ordernumber %] [% IF (order.parent_ordernumber && (order.parent_ordernumber != order.ordernumber)) %] ([% order.parent_ordernumber %]) [% END %] @@ -424,14 +476,24 @@ (suggestion #[% order.suggestionid %]) [% END %] - MARC | Card + +
+ + View + + +
+ [% order.quantityreceived %] [% order.budget.budget_name %] [% order.ecost | $Price %] [% order.unitprice | $Price %] [% order.total | $Price %] - - [% IF loop_receive.cannot_cancel or ( Koha.Preference("AcqCreateItem") == "receiving" and loop_receive.holds > 0 ) %] + [% IF loop_receive.cannot_cancel or ( Koha.Preference("AcqCreateItem") == "receiving" and loop_receive.holds > 0 ) %] + [% IF loop_receive.cannot_cancel %] [% span_title = BLOCK %] Cannot cancel receipt of this order line because it @@ -444,16 +506,18 @@ [%# FIXME Here we block the cancellation if holds exist. Actually it could be possible if items will be exist after the deletion %] [%# Some additional checks should be added in the pl file %] [% span_title = BLOCK %] - Cannot cancel receipt of this order line because at least one reservation exists on the records. + Cannot cancel receipt of this order line because at least one hold exists on the records. [% END %] [% END %] Can't cancel receipt - [% ELSE %] - Cancel receipt - [% END %] - + + [% ELSE %] + + Cancel receipt + + [% END %] [% END %] @@ -463,7 +527,7 @@ [% ELSE %]There are no received orders.[% END %] -