index.html.erb
35 lines
| 939 B
| text/plain
|
TextLexer
|
r11820 | <%= title [l(:label_workflow), workflows_edit_path], l(:field_summary) %> | ||
|
r1912 | |||
|
r13368 | <% if @roles.empty? || @trackers.empty? %> | ||
|
r1912 | <p class="nodata"><%= l(:label_no_data) %></p> | ||
<% else %> | ||||
|
r4314 | <div class="autoscroll"> | ||
|
r1912 | <table class="list"> | ||
<thead> | ||||
<tr> | ||||
<th></th> | ||||
|
r13368 | <% @roles.each do |role| %> | ||
|
r1912 | <th> | ||
|
r13368 | <%= content_tag(role.builtin? ? 'em' : 'span', role.name) %> | ||
|
r1912 | </th> | ||
<% end %> | ||||
</tr> | ||||
</thead> | ||||
<tbody> | ||||
|
r13368 | <% @trackers.each do |tracker| -%> | ||
|
r1912 | <tr class="<%= cycle('odd', 'even') %>"> | ||
|
r13368 | <td class="name"><%= tracker.name %></td> | ||
<% @roles.each do |role| -%> | ||||
<% count = @workflow_counts[[tracker.id, role.id]] || 0 %> | ||||
|
r12038 | <td> | ||
|
r14686 | <%= 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)) %> | ||||
|
r1912 | </td> | ||
<% end -%> | ||||
</tr> | ||||
<% end -%> | ||||
</tbody> | ||||
</table> | ||||
|
r4314 | </div> | ||
|
r1912 | <% end %> | ||