diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-07-26 08:30:19 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-07-26 08:30:19 +0000 |
commit | 2bc5b60f9de7c533b33348213f6ddac37dc9cdb3 (patch) | |
tree | 803c2d2ece43283b231b59ede3636c9fc2d3828a /app/views/workflows/_form.html.erb | |
parent | fdecb2a17b450c4524856b0286c2ec27ef113ea6 (diff) | |
download | redmine-2bc5b60f9de7c533b33348213f6ddac37dc9cdb3.tar.gz redmine-2bc5b60f9de7c533b33348213f6ddac37dc9cdb3.zip |
Makes new issue initial status settable in workflow (#5816).
git-svn-id: http://svn.redmine.org/redmine/trunk@14458 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/workflows/_form.html.erb')
-rw-r--r-- | app/views/workflows/_form.html.erb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/app/views/workflows/_form.html.erb b/app/views/workflows/_form.html.erb index a788a7a68..76f6fefe3 100644 --- a/app/views/workflows/_form.html.erb +++ b/app/views/workflows/_form.html.erb @@ -20,16 +20,17 @@ </tr> </thead> <tbody> - <% for old_status in @statuses %> + <% for old_status in [nil] + @statuses %> + <% next if old_status.nil? && name != 'always' %> <tr class="<%= cycle("odd", "even") %>"> <td class="name"> - <%= link_to_function(image_tag('toggle_check.png'), "toggleCheckboxesBySelector('table.transitions-#{name} input.old-status-#{old_status.id}')", + <%= link_to_function(image_tag('toggle_check.png'), "toggleCheckboxesBySelector('table.transitions-#{name} input.old-status-#{old_status.try(:id) || 0}')", :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %> - <%= old_status.name %> + <%= old_status ? old_status.name : content_tag('em', l(:label_issue_new)) %> </td> <% for new_status in @statuses -%> - <% checked = workflows.detect {|w| w.old_status_id == old_status.id && w.new_status_id == new_status.id} %> + <% checked = workflows.detect {|w| w.old_status == old_status && w.new_status == new_status} %> <td class="<%= checked ? 'enabled' : '' %>"> <%= transition_tag workflows, old_status, new_status, name %> </td> |