From 98aeda6c54b8e0ce6af7ccd3dd667d050f4fd823 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 6 Mar 2024 08:53:59 -0300 Subject: [PATCH] Bug 36193: cud- treatment for catalogue/stockrotation.pl Signed-off-by: Tomas Cohen Arazi Signed-off-by: Katrin Fischer --- catalogue/stockrotation.pl | 6 +-- .../en/modules/catalogue/stockrotation.tt | 44 ++++++++++++++----- 2 files changed, 37 insertions(+), 13 deletions(-) diff --git a/catalogue/stockrotation.pl b/catalogue/stockrotation.pl index 344e0317d7..71d68c4206 100755 --- a/catalogue/stockrotation.pl +++ b/catalogue/stockrotation.pl @@ -127,7 +127,7 @@ if (!defined $op) { C4::Search::enabled_staff_search_views ); -} elsif ($op eq "toggle_in_demand") { +} elsif ($op eq "cud-toggle_in_demand") { # Toggle in demand toggle_indemand($params{item_id}, $params{stage_id}); @@ -135,7 +135,7 @@ if (!defined $op) { # Return to items list print $input->redirect("?biblionumber=$biblionumber"); -} elsif ($op eq "remove_item_from_stage") { +} elsif ($op eq "cud-remove_item_from_stage") { # Remove from the stage remove_from_stage($params{item_id}, $params{stage_id}); @@ -143,7 +143,7 @@ if (!defined $op) { # Return to items list print $input->redirect("?biblionumber=$biblionumber"); -} elsif ($op eq "move_to_next_stage") { +} elsif ($op eq "cud-move_to_next_stage") { move_to_next_stage($params{item_id}, $params{stage_id}); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/stockrotation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/stockrotation.tt index b1e9e7c9df..4b626f4a2a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/stockrotation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/stockrotation.tt @@ -112,25 +112,42 @@ [% IF item.stockrotationitem %] [% in_transit = item.bib_item.get_transfer %] [% IF !in_transit && item.stages.size > 1 %] - +
+ [% INCLUDE 'csrf-token.inc' %] + + + + + +
[% ELSE %] -
+ Move to next stage [% END %] - - Move to next stage - + [% IF !in_transit %] - +
+ [% INCLUDE 'csrf-token.inc' %] + + + + + +
[% ELSE %] -
- [% END %] - + [% IF item.stockrotationitem.indemand %] Remove "In demand" [% ELSE %] Add "In demand" [% END %] + [% END %] + [% IF !in_transit %] [% ELSE %] @@ -170,7 +187,14 @@

Are you sure you want to remove this item from it's rota?

- Yes +

+ [% INCLUDE 'csrf-token.inc' %] + + + + + +
No

-- 2.39.5