summaryrefslogtreecommitdiffstats
path: root/app/views/workflows/index.html.erb
blob: 3ee55d1255b993ab6f0cd195722cb7d80fd0be8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<%= title [l(:label_workflow), workflows_edit_path], l(:field_summary) %>

<% if @roles.empty? || @trackers.empty? %>
<p class="nodata"><%= l(:label_no_data) %></p>
<% else %>
<div class="autoscroll">
<table class="list">
<thead>
    <tr>
    <th></th>
    <% @roles.each do |role| %>
    <th>
        <%= content_tag(role.builtin? ? 'em' : 'span', role.name) %>
    </th>
    <% end %>
    </tr>
</thead>
<tbody>
<% @trackers.each do |tracker| -%>
<tr class="<%= cycle('odd', 'even') %>">
  <td class="name"><%= tracker.name %></td>
  <% @roles.each do |role| -%>
  <% count = @workflow_counts[[tracker.id, role.id]] || 0 %>
    <td>
      <%= link_to((count > 0 ? count : image_tag('false.png')), {:action => 'edit', :role_id => role, :tracker_id => tracker}, :title => l(:button_edit)) %>
    </td>
  <% end -%>
</tr>
<% end -%>
</tbody>
</table>
</div>
<% end %>