From a0f1014b17cc679dea65432f22dacb6d72c76a66 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 21 Oct 2019 18:06:07 +0200 Subject: [PATCH] Bug 23594: Batch modification for itemtypes on suggestions page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This new enhancement adds the ability to update the item types for selected suggestions on the suggestions management page (suggestion/suggestion.pl) To achieve this goal we needed to refresh a bit the template, in order to get rid of weird code. To not recreate the previous coding awkwardness some code has been rewritten (mainly the removal of suggestiontype) Test plan: - Create some suggestions - On the suggestions management page, select some of them and a new item types. - Submit the form and confirm that the itemtype of the suggestions has been updated - Also you should confirm that the "delete" and "change status" still work as before Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Séverine QUEUNE Signed-off-by: Katrin Fischer --- .../prog/en/modules/suggestion/suggestion.tt | 226 +++++++++++---------- suggestion/suggestion.pl | 17 +- 2 files changed, 126 insertions(+), 117 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt index 38d74c8ad3..075b7c62a9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt @@ -56,7 +56,7 @@
@@ -470,7 +470,7 @@
    [% FOREACH suggestion IN suggestions %]
  • - + [% IF ( suggestion.suggestiontypelabel ) %] [% IF (suggestion.suggestiontypelabel == "Pending") %]Pending [% ELSIF (suggestion.suggestiontypelabel == "Accepted") %]Accepted @@ -494,12 +494,12 @@ [% END %] [% FOREACH suggestion IN suggestions %] -
    -
    +
    + [% IF ( suggestion.suggestions_loop ) %] -

    Check all | Uncheck all

    - +

    Check all | Uncheck all

    +
    @@ -518,7 +518,7 @@ [% FOREACH suggestions_loo IN suggestion.suggestions_loop %] [% END %] -
     
    - + @@ -571,80 +571,93 @@ Edit - Delete + Delete
    -
    -
    - - - - - - - - - Cancel - - - OR: +
    +

    Change selected suggestions

    +
    +
    +
    + + + + + + + + + Cancel + +
    + + +
    +
    +
    +
    +
    + + [% PROCESS 'av-build-dropbox.inc' name="suggestion_itemtype", category="SUGGEST_FORMAT", size = 20 %] + +
    +
    +
    - - +
    +
    + + +
    +
    +
    -
    - - - -
    -
    -
    - [% ELSE %] No results. [% END %] +
    [% END %] -
    [% END %] [% UNLESS ( op_save ) %] @@ -823,15 +836,8 @@ [% INCLUDE 'datatables.inc' %] [% INCLUDE 'columns_settings.inc' %] [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %] -