From c9d3e5470709f1f44e0952d06832a45909046ef1 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 20 Jun 2018 16:12:41 +0000 Subject: [PATCH] Bug 20970: Reformat basket information on acquisitions basket page This patch reformats the display of information on the acquisitions basket page, hiding form controls until they are triggered. Some basket information is now in the second column in order to balance the two columns better. The "Library" label has been replaced with the more precise "Managing library." Unrelated change: Removed script type attributes. To test, apply the patch and view a basket in acquisitions. Test these processes: - Adding and removing managing users - Setting and changing managing library - Setting and changing basket group Signed-off-by: Caroline Cyr La Rose Signed-off-by: Jonathan Druart Signed-off-by: Nick Clemens --- .../prog/en/modules/acqui/basket.tt | 261 +++++++++++------- 1 file changed, 166 insertions(+), 95 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt index 49ee8c8391..56285f0f64 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -223,117 +223,160 @@ Managed by:
    - [% FOREACH user IN users %] -
  • - [% user.firstname | html %] [% user.surname | html %] - Delete user + [% FOREACH user IN users %] +
  • + [% user.firstname | html %] [% user.surname | html %] + Delete user +
  • + [% END %] +
  • + Add user +
  • + - [% END %]
- - - - -
+ + + +
  • - Library: + Managing library: [% IF basketbranchcode %] [% Branches.GetName( basketbranchcode ) | html %] + Change library [% ELSE %] No library - [% END %] - [% IF branches_loop.size %] -
    - - - - -
    + Set library [% END %]
  • - [% IF ( creationdate ) %]
  • Opened on: [% creationdate | $KohaDates %]
  • [% END %] - [% IF ( closedate ) %]
  • Closed on: [% closedate | $KohaDates %]
  • [% END %] - [% IF ( estimateddeliverydate ) %]
  • Estimated delivery date: [% estimateddeliverydate | $KohaDates | html %]
  • [% END %] -
  • Orders are standing: [% IF is_standing %]Yes[% ELSE %]No[% END %]
  • - - [% IF basket.create_items %] -
  • - Create items when: - [% SWITCH basket.create_items %] - [% CASE 'receiving' %]Receiving items - [% CASE 'cataloguing' %]Cataloguing items - [% CASE %]Placing orders - [% END %] + [% IF branches_loop.size %] +
  • [% END %] - [% IF ( closedate ) %] +
    - [% IF ( CAN_user_acquisition_group_manage ) %] -
    - [% END %] +
      + [% IF ( creationdate ) %] +
    1. Opened on: [% creationdate | $KohaDates %]
    2. + [% END %] + [% IF ( closedate ) %] +
    3. Closed on: [% closedate | $KohaDates %]
    4. + [% END %] + [% IF ( estimateddeliverydate ) %] +
    5. Estimated delivery date: [% estimateddeliverydate | $KohaDates %]
    6. + [% END %] +
    7. Orders are standing: [% IF is_standing %]Yes[% ELSE %]No[% END %]
    8. + + [% IF basket.create_items %] +
    9. + Create items when: + [% SWITCH basket.create_items %] + [% CASE 'receiving' %]Receiving items + [% CASE 'cataloguing' %]Cataloguing items + [% CASE %]Placing orders + [% END %] +
    10. + [% END %] +
    + + [% IF ( closedate ) %]
      -
    1. - Basket group: - [% IF basketgroup.id and not basketgroup.name %] - [% SET basketgroup.name = "Basket group no. " _ basketgroup.id %] - [% END %] - [% IF basketgroup.closed %] - [% IF ( CAN_user_acquisition_group_manage ) %] - [% basketgroup.name | html %] (closed) - [% ELSE %] - [% basketgroup.name | html %] (closed) - [% END %] - [% ELSIF ( ! CAN_user_acquisition_group_manage ) %] - [%- IF basketgroup.id -%] +
    2. + Basket group: + [% IF basketgroup.id and not basketgroup.name %] + [% SET basketgroup.name = "Basket group no. " _ basketgroup.id %] + [% END %] + + [% IF basketgroup.closed %] + [% IF ( CAN_user_acquisition_group_manage ) %] + [% basketgroup.name | html %] (closed) + [% ELSE %] + [% basketgroup.name | html %] (closed) + [% END %] + [% ELSIF ( ! CAN_user_acquisition_group_manage ) %] + [%- IF basketgroup.id -%] [% basketgroup.name | html %] - [%- ELSE -%] - No group - [%- END -%] - [% ELSE %] - - - - - - [% END %] -
    3. - [% IF basketgroup.deliveryplace %]
    4. Basket group delivery placename: [% Branches.GetName( basketgroup.deliveryplace ) | html %]
    5. [% END %] - [% IF basketgroup.billingplace %]
    6. Basket group billing place: [% Branches.GetName( basketgroup.billingplace ) | html %]
    7. [% END %] + + [% IF ( CAN_user_acquisition_group_manage ) %] + + [% END # /IF ( CAN_user_acquisition_group_manage ) %] + [% IF basketgroup.deliveryplace %] +
    8. + Basket group delivery placename: [% Branches.GetName( basketgroup.deliveryplace ) | html %] +
    9. + [% END %] + [% IF basketgroup.billingplace %] +
    10. + Basket group billing place: [% Branches.GetName( basketgroup.billingplace ) | html %] +
    11. + [% END %]
    - [% IF ( CAN_user_acquisition_group_manage ) %] - - [% END %] + [% END # /IF closeddate %]
    - [% END %] [% END %] @@ -688,7 +731,8 @@ [% END %][%# IF (cannot_manage_basket) %]
    -[% INCLUDE 'acquisitions-menu.inc' %] + [% INCLUDE 'vendor-menu.inc' %] + [% INCLUDE 'acquisitions-menu.inc' %]
    @@ -718,9 +762,9 @@ [% MACRO jsinclude BLOCK %] [% Asset.js("js/acquisitions-menu.js") | $raw %] -[% INCLUDE 'datatables.inc' %] + [% INCLUDE 'datatables.inc' %] [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") | $raw %] - [% UNLESS ( closedate ) %] - [% ELSE %] - [% UNLESS ( grouped ) %] - [% END %] [% END %] - [% END %] -- 2.39.5