Allow additional workflow transitions for issue author and assignee (#2732).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4895 e93f8b46-1217-0410-a6f0-8f06a7374b81pull/351/head
parent
93a6d6c296
commit
cc2d6f3605
@ -0,0 +1,40 @@ |
||||
<table class="list transitions-<%= name %>"> |
||||
<thead> |
||||
<tr> |
||||
<th align="left"> |
||||
<%= link_to_function(image_tag('toggle_check.png'), "toggleCheckboxesBySelector('table.transitions-#{name} input')", |
||||
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %> |
||||
<%=l(:label_current_status)%> |
||||
</th> |
||||
<th align="center" colspan="<%= @statuses.length %>"><%=l(:label_new_statuses_allowed)%></th> |
||||
</tr> |
||||
<tr> |
||||
<td></td> |
||||
<% for new_status in @statuses %> |
||||
<td width="<%= 75 / @statuses.size %>%" align="center"> |
||||
<%= link_to_function(image_tag('toggle_check.png'), "toggleCheckboxesBySelector('table.transitions-#{name} input.new-status-#{new_status.id}')", |
||||
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %> |
||||
<%=h new_status.name %> |
||||
</td> |
||||
<% end %> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
<% for old_status in @statuses %> |
||||
<tr class="<%= cycle("odd", "even") %>"> |
||||
<td> |
||||
<%= link_to_function(image_tag('toggle_check.png'), "toggleCheckboxesBySelector('table.transitions-#{name} input.old-status-#{old_status.id}')", |
||||
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %> |
||||
|
||||
<%=h old_status.name %> |
||||
</td> |
||||
<% for new_status in @statuses -%> |
||||
<td align="center"> |
||||
<%= check_box_tag "issue_status[#{ old_status.id }][#{new_status.id}][]", name, workflows.detect {|w| w.old_status_id == old_status.id && w.new_status_id == new_status.id}, |
||||
:class => "old-status-#{old_status.id} new-status-#{new_status.id}" %> |
||||
</td> |
||||
<% end -%> |
||||
</tr> |
||||
<% end %> |
||||
</tbody> |
||||
</table> |
@ -0,0 +1,13 @@ |
||||
class AddWorkflowsAssigneeAndAuthor < ActiveRecord::Migration |
||||
def self.up |
||||
add_column :workflows, :assignee, :boolean, :null => false, :default => false |
||||
add_column :workflows, :author, :boolean, :null => false, :default => false |
||||
Workflow.update_all("assignee = #{Workflow.connection.quoted_false}") |
||||
Workflow.update_all("author = #{Workflow.connection.quoted_false}") |
||||
end |
||||
|
||||
def self.down |
||||
remove_column :workflows, :assignee |
||||
remove_column :workflows, :author |
||||
end |
||||
end |
@ -1,31 +1,37 @@ |
||||
--- |
||||
issue_statuses_006: |
||||
name: Rejected |
||||
is_default: false |
||||
is_closed: true |
||||
id: 6 |
||||
issue_statuses_001: |
||||
id: 1 |
||||
name: New |
||||
is_default: true |
||||
is_closed: false |
||||
id: 1 |
||||
position: 1 |
||||
issue_statuses_002: |
||||
id: 2 |
||||
name: Assigned |
||||
is_default: false |
||||
is_closed: false |
||||
id: 2 |
||||
position: 2 |
||||
issue_statuses_003: |
||||
id: 3 |
||||
name: Resolved |
||||
is_default: false |
||||
is_closed: false |
||||
id: 3 |
||||
position: 3 |
||||
issue_statuses_004: |
||||
name: Feedback |
||||
id: 4 |
||||
is_default: false |
||||
is_closed: false |
||||
id: 4 |
||||
position: 4 |
||||
issue_statuses_005: |
||||
id: 5 |
||||
name: Closed |
||||
is_default: false |
||||
is_closed: true |
||||
id: 5 |
||||
position: 5 |
||||
issue_statuses_006: |
||||
id: 6 |
||||
name: Rejected |
||||
is_default: false |
||||
is_closed: true |
||||
position: 6 |
||||
|
Loading…
Reference in new issue