Feature #5358 » inherited_categories.diff
| app/models/project.rb | ||
|---|---|---|
|
end
|
||
|
end
|
||
|
def inherited_categories
|
||
|
self_and_ancestors.inject([]) { |l, p| l += p.issue_categories }
|
||
|
end
|
||
|
def identifier=(identifier)
|
||
|
super unless identifier_frozen?
|
||
|
end
|
||
| app/views/issues/_attributes.html.erb | ||
|---|---|---|
|
<p><%= f.select :assigned_to_id, principals_options_for_select(@issue.assignable_users, @issue.assigned_to), :include_blank => true %></p>
|
||
|
<% end %>
|
||
|
<% if @issue.safe_attribute?('category_id') && @issue.project.issue_categories.any? %>
|
||
|
<p><%= f.select :category_id, (@issue.project.issue_categories.collect {|c| [c.name, c.id]}), :include_blank => true %>
|
||
|
<% if @issue.safe_attribute?('category_id') && @issue.project.inherited_categories.any? %>
|
||
|
<p><%= f.select :category_id, (@issue.project.inherited_categories.collect {|c| [c.name, c.id]}), :include_blank => true %>
|
||
|
<%= prompt_to_remote(image_tag('add.png', :style => 'vertical-align: middle;'),
|
||
|
l(:label_issue_category_new),
|
||
|
'issue_category[name]',
|
||