Adds a workflow overview screen.
Workflow setup moved to a dedicated controller. git-svn-id: http://redmine.rubyforge.org/svn/trunk@1914 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
1 parent
85711f1d54
commit
a37af7a226
9 files changed
+208
-65
No files matched your search
@@ -19,7 +19,7 @@
|
||||
<p class="icon22 icon22-tracker">
|
||||
<%= link_to l(:label_tracker_plural), :controller => 'trackers' %> |
|
||||
<%= link_to l(:label_issue_status_plural), :controller => 'issue_statuses' %> |
|
||||
<%= link_to l(:label_workflow), :controller => 'roles', :action => 'workflow' %>
|
||||
<%= link_to l(:label_workflow), :controller => 'workflows', :action => 'edit' %>
|
||||
</p>
|
||||
|
||||
<p class="icon22 icon22-workflow">
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
<div class="contextual">
|
||||
<%= link_to l(:field_summary), :action => 'index' %>
|
||||
</div>
|
||||
|
||||
<h2><%=l(:label_workflow)%></h2>
|
||||
|
||||
<p><%=l(:text_workflow_edit)%>:</p>
|
||||
|
||||
<% form_tag({:action => 'workflow'}, :method => 'get') do %>
|
||||
<% form_tag({}, :method => 'get') do %>
|
||||
<p><label for="role_id"><%=l(:label_role)%>:</label>
|
||||
<select id="role_id" name="role_id">
|
||||
<%= options_from_collection_for_select @roles, "id", "name", (@role.id unless @role.nil?) %>
|
||||
@@ -12,14 +16,16 @@
|
||||
<select id="tracker_id" name="tracker_id">
|
||||
<%= options_from_collection_for_select @trackers, "id", "name", (@tracker.id unless @tracker.nil?) %>
|
||||
</select>
|
||||
<%= submit_tag l(:button_edit) %>
|
||||
<%= submit_tag l(:button_edit), :name => nil %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
|
||||
|
||||
<% unless @tracker.nil? or @role.nil? %>
|
||||
<% form_tag({:action => 'workflow', :role_id => @role, :tracker_id => @tracker }, :id => 'workflow_form' ) do %>
|
||||
<% form_tag({}, :id => 'workflow_form' ) do %>
|
||||
<%= hidden_field_tag 'tracker_id', @tracker.id %>
|
||||
<%= hidden_field_tag 'role_id', @role.id %>
|
||||
<div class="box">
|
||||
<table>
|
||||
<tr>
|
||||
@@ -0,0 +1,31 @@
|
||||
<h2><%=l(:label_workflow)%></h2>
|
||||
|
||||
<% if @workflow_counts.empty? %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% else %>
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<% @workflow_counts.first.last.each do |role, count| %>
|
||||
<th>
|
||||
<%= content_tag(role.builtin? ? 'em' : 'span', h(role.name)) %>
|
||||
</th>
|
||||
|
||||
<% end %>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @workflow_counts.each do |tracker, roles| -%>
|
||||
<tr class="<%= cycle('odd', 'even') %>">
|
||||
<td><%= h tracker %></td>
|
||||
<% roles.each do |role, count| -%>
|
||||
<td align="center">
|
||||
<%= link_to((count > 1 ? count : image_tag('false.png')), {:action => 'edit', :role_id => role, :tracker_id => tracker}, :title => l(:button_edit)) %>
|
||||
</td>
|
||||
<% end -%>
|
||||
</tr>
|
||||
<% end -%>
|
||||
</tbody>
|
||||
</table>
|
||||
<% end %>
|
||||
Reference in new issue
Block a user