2013-07-28 11:50:18 +00:00
|
|
|
<%= title [l(:label_workflow), workflows_edit_path], l(:field_summary) %>
|
2008-09-28 12:03:17 +00:00
|
|
|
|
2014-12-13 16:55:28 +00:00
|
|
|
<% if @roles.empty? || @trackers.empty? %>
|
2008-09-28 12:03:17 +00:00
|
|
|
<p class="nodata"><%= l(:label_no_data) %></p>
|
|
|
|
|
<% else %>
|
2010-11-27 09:54:16 +00:00
|
|
|
<div class="autoscroll">
|
2008-09-28 12:03:17 +00:00
|
|
|
<table class="list">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th></th>
|
2014-12-13 16:55:28 +00:00
|
|
|
<% @roles.each do |role| %>
|
2008-09-28 12:03:17 +00:00
|
|
|
<th>
|
2014-12-13 16:55:28 +00:00
|
|
|
<%= content_tag(role.builtin? ? 'em' : 'span', role.name) %>
|
2008-09-28 12:03:17 +00:00
|
|
|
</th>
|
|
|
|
|
<% end %>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
2014-12-13 16:55:28 +00:00
|
|
|
<% @trackers.each do |tracker| -%>
|
2008-09-28 12:03:17 +00:00
|
|
|
<tr class="<%= cycle('odd', 'even') %>">
|
2014-12-13 16:55:28 +00:00
|
|
|
<td class="name"><%= tracker.name %></td>
|
|
|
|
|
<% @roles.each do |role| -%>
|
|
|
|
|
<% count = @workflow_counts[[tracker.id, role.id]] || 0 %>
|
2013-11-11 21:01:21 +00:00
|
|
|
<td>
|
2016-01-20 08:50:39 +00:00
|
|
|
<%= link_to((count > 0 ? count : content_tag(:span, nil, :class => 'icon-only icon-not-ok')),
|
|
|
|
|
{:action => 'edit', :role_id => role, :tracker_id => tracker},
|
|
|
|
|
:title => l(:button_edit)) %>
|
2008-09-28 12:03:17 +00:00
|
|
|
</td>
|
|
|
|
|
<% end -%>
|
|
|
|
|
</tr>
|
|
|
|
|
<% end -%>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
2010-11-27 09:54:16 +00:00
|
|
|
</div>
|
2008-09-28 12:03:17 +00:00
|
|
|
<% end %>
|