From 4dfd7ad5ec4191c9e11f1352d3a51a62fa7d3c9b Mon Sep 17 00:00:00 2001 From: Kirk Wang Date: Mon, 11 Mar 2024 08:15:29 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20Hide=20custom=20Hyku=20Commons?= =?UTF-8?q?=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit will hide the custom Hyku Commons workflow from the admin workflow form. This is a temporary measure to ensure that the option is not going to show up in the admin interface to reduce confusion. The long-term fix will be to create a script and delete the custom workflow from the database from each tenant, however it was warned that working with Siptiy::Workflow might be a little tricky. Ref: - https://github.com/scientist-softserv/palni-palci/issues/448 --- .../hyrax/admin/admin_sets/_form_workflow.erb | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 app/views/hyrax/admin/admin_sets/_form_workflow.erb diff --git a/app/views/hyrax/admin/admin_sets/_form_workflow.erb b/app/views/hyrax/admin/admin_sets/_form_workflow.erb new file mode 100644 index 000000000..a7381ef61 --- /dev/null +++ b/app/views/hyrax/admin/admin_sets/_form_workflow.erb @@ -0,0 +1,30 @@ +<%# OVERRIDE Hyrax v3.6.0 to hide custom mediated workflow for Hyku Commons %> + +
+
+ <%= simple_form_for collection_permission_template_form_for(form: @form), + url: [hyrax, :admin, @form, :permission_template], + html: { id: 'form_workflows', class: 'nav-safety' } do |f| %> + <% if f.object.available_workflows.any? %> +
+

<%= t('.page_description') %>

+ <%# OVERRIDE begin %> + <% available_workflows = f.object.available_workflows.select { |wf| wf.name != 'hyku_commons_mediated_deposit' } %> + <%= f.collection_radio_buttons :workflow_id, available_workflows, :id, :label, item_wrapper_tag: :div, item_wrapper_class: "radio" do |b| %> + <%# OVERRIDE end %> + <%= b.radio_button + b.object.label %> +

<%= b.object.description %>

+ <% end %> +
+ + <% else %> +
+

<%= t('.no_workflows') %>

+
+ <% end %> + <% end %> +
+