sul-dlss/argo

View on GitHub
app/views/catalog/_show_workflows.html.erb

Summary

Maintainability
Test Coverage
<table class="detail" id="workflow-details">
  <thead>
  <tr><th>name</th><th>status</th></tr>
  </thead>
  <tbody>
  <% if workflows.length > 0 %>
    <% workflows.each do |wf| %>
      <tr>
        <td><%= link_to wf.name, item_workflow_path(document_id, wf.name), title: wf.name, data: { blacklight_modal: 'trigger' } %></td>
        <td id="workflow-details-status-<%= wf.name %>">
          <%= wf.complete? ? 'completed' : 'active' %>
          <% if wf.error_count.positive? %>
            <span class="errortext">(<%= pluralize(wf.error_count, 'error') %>)</span>
          <% end %>
        </td>
      </tr>
    <% end %>
  <% else %>
    <tr><td colspan="3">No workflows</td></tr>
  <% end %>
  </tbody>
</table>