Skip to content

Commit

Permalink
🧹 Hide custom Hyku Commons workflow
Browse files Browse the repository at this point in the history
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:
  - #448
  • Loading branch information
kirkkwang committed Mar 11, 2024
1 parent 575eb31 commit 4dfd7ad
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions app/views/hyrax/admin/admin_sets/_form_workflow.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<%# OVERRIDE Hyrax v3.6.0 to hide custom mediated workflow for Hyku Commons %>

<div id="workflow" class="tab-pane">
<div class="panel panel-default labels">
<%= 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? %>
<div class="panel-body">
<p><%= t('.page_description') %></p>
<%# 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 %>
<span><%= b.radio_button + b.object.label %></span>
<p><%= b.object.description %></p>
<% end %>
</div>
<div class="panel-footer">
<%= link_to t('.cancel'), hyrax.admin_admin_sets_path, class: 'btn btn-default pull-right'%>
<%= f.button :submit, class: 'btn btn-primary pull-right'%>
</div>
<% else %>
<div class="panel-body">
<p><%= t('.no_workflows') %></p>
</div>
<% end %>
<% end %>
</div>
</div>

0 comments on commit 4dfd7ad

Please sign in to comment.