]> source.dussan.org Git - redmine.git/commitdiff
Added ability to create issue directly as a subtask of another one. #5484
authorJean-Baptiste Barth <jeanbaptiste.barth@gmail.com>
Sat, 30 Oct 2010 16:15:31 +0000 (16:15 +0000)
committerJean-Baptiste Barth <jeanbaptiste.barth@gmail.com>
Sat, 30 Oct 2010 16:15:31 +0000 (16:15 +0000)
Contributed by Felix Schäfer

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4311 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/issues/_form.rhtml
app/views/issues/new.rhtml

index 7e9a29ee5516acd0e452c13c41d3bce40468cd9d..2f4996a93983e1dcf419f6802b1ae9344c2fdc8b 100644 (file)
@@ -8,8 +8,8 @@
 
 <p><%= f.text_field :subject, :size => 80, :required => true %></p>
                                      
-<% unless (@issue.new_record? && @issue.parent_issue_id.nil?) || !User.current.allowed_to?(:manage_subtasks, @project) %>
-<p><%= f.text_field :parent_issue_id, :size => 10 %></p>
+<% if User.current.allowed_to?(:manage_subtasks, @project) %>
+<p id="parent_issue"><%= f.text_field :parent_issue_id, :size => 10 %></p>
 <div id="parent_issue_candidates" class="autocomplete"></div>
 <%= javascript_tag "observeParentIssueField('#{auto_complete_issues_path(:id => @issue, :project_id => @project) }')" %>
 <% end %>
index 310085d7cc41c8922bcf3e04fcb9594132fc2ed4..13992382f9bfd9cb5980662d3fef3a81d0d6a54f 100644 (file)
@@ -1,7 +1,7 @@
 <h2><%=l(:label_issue_new)%></h2>
 
 <% labelled_tabular_form_for :issue, @issue, :url => {:controller => 'issues', :action => 'create', :project_id => @project},
-                             :html => {:multipart => true, :id => 'issue-form'} do |f| %>
+                             :html => {:multipart => true, :id => 'issue-form', :class => 'tabular new-issue-form'} do |f| %>
     <%= error_messages_for 'issue' %>
     <div class="box">
     <%= render :partial => 'issues/form', :locals => {:f => f} %>