OSDN Git Service

Adds a workflow overview screen.
[redminele/redmine.git] / app / views / workflows / index.rhtml
1 <h2><%=l(:label_workflow)%></h2>
2
3 <% if @workflow_counts.empty? %>
4 <p class="nodata"><%= l(:label_no_data) %></p>
5 <% else %>
6 <table class="list">
7 <thead>
8     <tr>
9     <th></th>
10     <% @workflow_counts.first.last.each do |role, count| %>
11     <th>
12         <%= content_tag(role.builtin? ? 'em' : 'span', h(role.name)) %>
13     </th>
14     
15     <% end %>
16     </tr>
17 </thead>
18 <tbody>
19 <% @workflow_counts.each do |tracker, roles| -%>
20 <tr class="<%= cycle('odd', 'even') %>">
21   <td><%= h tracker %></td>
22   <% roles.each do |role, count| -%>
23     <td align="center">
24       <%= link_to((count > 1 ? count : image_tag('false.png')), {:action => 'edit', :role_id => role, :tracker_id => tracker}, :title => l(:button_edit)) %>
25     </td>
26   <% end -%>
27 </tr>
28 <% end -%>
29 </tbody>
30 </table>
31 <% end %>