From 27fd8a2436db0512dd5b779848043cacb80943f1 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 17 Jan 2009 08:03:53 +0000 Subject: [PATCH] Do not show Category field when categories are not defined. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2270 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/issues/_form.rhtml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/issues/_form.rhtml b/app/views/issues/_form.rhtml index ff9b37685..fac2d6a36 100644 --- a/app/views/issues/_form.rhtml +++ b/app/views/issues/_form.rhtml @@ -25,11 +25,13 @@

<%= f.select :priority_id, (@priorities.collect {|p| [p.name, p.id]}), :required => true %>

<%= f.select :assigned_to_id, (@issue.assignable_users.collect {|m| [m.name, m.id]}), :include_blank => true %>

+<% unless @project.issue_categories.empty? %>

<%= f.select :category_id, (@project.issue_categories.collect {|c| [c.name, c.id]}), :include_blank => true %> <%= prompt_to_remote(l(:label_issue_category_new), l(:label_issue_category_new), 'category[name]', {:controller => 'projects', :action => 'add_issue_category', :id => @project}, :class => 'small', :tabindex => 199) if authorize_for('projects', 'add_issue_category') %>

+<% end %> <%= content_tag('p', f.select(:fixed_version_id, (@project.versions.sort.collect {|v| [v.name, v.id]}), { :include_blank => true })) unless @project.versions.empty? %>