app/views/workflows/_show.html.erb
<span class="section-head-link">
View:
<%= link_to 'XML', item_workflow_path(item_id: @presenter.druid, id: @presenter.workflow_name, raw: 'true'),
title: @presenter.workflow_name,
data: { blacklight_modal: 'trigger' } %>
</span>
<%= @presenter.druid %>
<table class="detail table">
<thead>
<tr>
<th></th>
<th>Process</th>
<th>Status</th>
<th>Reset</th>
<th>When</th>
<th>Seconds elapsed</th>
<th>Attempts</th>
<th>Lifecycle</th>
</tr>
</thead>
<tbody>
<% if @presenter.processes.any? %>
<% @presenter.processes.each_with_index do |process, index| %>
<%= render WorkflowProcessRow.new(index:, process:, cocina_object: @presenter.cocina_object) %>
<% end %>
<% else %>
<tr><td colspan="8">No processes defined for this workflow.</td></tr>
<% end %>
</tbody>
</table>
<% if @presenter.workflow_context.present? %>
<div id="workflow-context">
<table class="table table-bordered">
<thead>
<tr>
<th scope="col">Workflow Variable</th>
<th scope="col">Workflow Setting</th>
</tr>
</thead>
<tbody>
<% @presenter.workflow_context.each do |key, value| %>
<tr>
<td><%= key %></td>
<td><%= value.is_a?(Array) ? value.join(', ') : value %></td>
</tr>
<% end %>
</tbody>
</table>
</div>
<% end %>