Commit b025b631 authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

Hide 'Target version' filter if no version is defined.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1575 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent b14aa23c
......@@ -168,7 +168,9 @@ class Query < ActiveRecord::Base
if project
# project specific filters
@available_filters["category_id"] = { :type => :list_optional, :order => 6, :values => @project.issue_categories.collect{|s| [s.name, s.id.to_s] } }
@available_filters["fixed_version_id"] = { :type => :list_optional, :order => 7, :values => @project.versions.sort.collect{|s| [s.name, s.id.to_s] } }
unless @project.versions.empty?
@available_filters["fixed_version_id"] = { :type => :list_optional, :order => 7, :values => @project.versions.sort.collect{|s| [s.name, s.id.to_s] } }
end
unless @project.active_children.empty?
@available_filters["subproject_id"] = { :type => :list_subprojects, :order => 13, :values => @project.active_children.collect{|s| [s.name, s.id.to_s] } }
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment