From 6d39e53284cd8097fcd1c641c654cfa6d63b1a46 Mon Sep 17 00:00:00 2001 From: fherreazcue Date: Fri, 6 Oct 2023 13:38:33 +0100 Subject: [PATCH 1/3] Updates show_hide_blocked status in batch_asset_selection --- app/views/assets/_batch_asset_selection.html.erb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/views/assets/_batch_asset_selection.html.erb b/app/views/assets/_batch_asset_selection.html.erb index 88485bd4c7..3f34a53470 100644 --- a/app/views/assets/_batch_asset_selection.html.erb +++ b/app/views/assets/_batch_asset_selection.html.erb @@ -10,6 +10,7 @@ text: "your items", select_deselect_all: true, collapse_expand: true, + show_hide_blocked: publishing, show_hide_permissions: show_permissions } %> @@ -34,6 +35,7 @@
<%= render partial: 'assets/batch_selection/buttons', locals: { text: (text_for_resource items.first).downcase.pluralize, + show_hide_blocked: publishing, select_deselect_all: true } %> <% items.each do |item| %> @@ -57,6 +59,7 @@
<%= render partial: 'assets/batch_selection/buttons', locals: { text: "items not in ISA", + show_hide_blocked: publishing, select_deselect_all: true } %> <% @assets_not_in_isa.each do |item| %> From 3b43dd0ec495219881ef622b25ff8c6565db4c17 Mon Sep 17 00:00:00 2001 From: fherreazcue Date: Fri, 6 Oct 2023 13:39:06 +0100 Subject: [PATCH 2/3] Adds batch_selection/buttons to publish_related_items --- .../assets/publishing/publish_related_items.html.erb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/views/assets/publishing/publish_related_items.html.erb b/app/views/assets/publishing/publish_related_items.html.erb index 4685cebdd1..dd28b95f1a 100644 --- a/app/views/assets/publishing/publish_related_items.html.erb +++ b/app/views/assets/publishing/publish_related_items.html.erb @@ -12,6 +12,14 @@
<%= form_tag({action: :check_gatekeeper_required}, method: :post) do %> +
+ <%= render partial: 'assets/batch_selection/buttons', locals: { + text: "your items", + select_deselect_all: true, + collapse_expand: true, + show_hide_blocked: true, + show_hide_permissions: true + } %> <% @items_for_publishing.each do |item| %> <% if item.contains_publishable_items? %> <% if item.is_asset? %> @@ -26,7 +34,7 @@ <%= check_box_tag publishing_item_param(item), 1, true, {style: 'display:none;'} %> <% end %> <% end %> - +
<% resource = (controller_name == 'people') ? current_user.person : @asset %> <%= submit_tag "Next",data: { disable_with: 'Next' }, class: 'btn btn-primary' -%> From a83172185befed576c909737d7324e87b57df686 Mon Sep 17 00:00:00 2001 From: fherreazcue Date: Fri, 6 Oct 2023 14:27:32 +0100 Subject: [PATCH 3/3] Fix issue with collapse_all in publish_related_items --- .../publishing/publish_related_items.html.erb | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/app/views/assets/publishing/publish_related_items.html.erb b/app/views/assets/publishing/publish_related_items.html.erb index dd28b95f1a..bb17deaf04 100644 --- a/app/views/assets/publishing/publish_related_items.html.erb +++ b/app/views/assets/publishing/publish_related_items.html.erb @@ -20,20 +20,22 @@ show_hide_blocked: true, show_hide_permissions: true } %> - <% @items_for_publishing.each do |item| %> - <% if item.contains_publishable_items? %> - <% if item.is_asset? %> - <%= render partial: "assets/batch_selection/asset_row", - collection: item.assays.map(&:study).map(&:investigation).flatten.uniq, - locals: { preselected: item, publishing: true, show_permissions: true, show_children: true } %> - <% else %> - <%= render partial: "assets/batch_selection/asset_row", object: item, - locals: { preselected: item, publishing: true, show_permissions: true, show_children: true } %> +
+ <% @items_for_publishing.each do |item| %> + <% if item.contains_publishable_items? %> + <% if item.is_asset? %> + <%= render partial: "assets/batch_selection/asset_row", + collection: item.assays.map(&:study).map(&:investigation).flatten.uniq, + locals: { preselected: item, publishing: true, show_permissions: true, show_children: true } %> + <% else %> + <%= render partial: "assets/batch_selection/asset_row", object: item, + locals: { preselected: item, publishing: true, show_permissions: true, show_children: true } %> + <% end %> + <% else %> + <%= check_box_tag publishing_item_param(item), 1, true, {style: 'display:none;'} %> + <% end %> <% end %> - <% else %> - <%= check_box_tag publishing_item_param(item), 1, true, {style: 'display:none;'} %> - <% end %> - <% end %> +
<% resource = (controller_name == 'people') ? current_user.person : @asset %>