Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11467 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
ace19cc20f
commit
0082e36b60
|
@ -194,6 +194,7 @@ module IssuesHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def query_links(title, queries)
|
def query_links(title, queries)
|
||||||
|
return '' if queries.empty?
|
||||||
# links to #index on issues/show
|
# links to #index on issues/show
|
||||||
url_params = controller_name == 'issues' ? {:controller => 'issues', :action => 'index', :project_id => @project} : params
|
url_params = controller_name == 'issues' ? {:controller => 'issues', :action => 'index', :project_id => @project} : params
|
||||||
|
|
||||||
|
@ -210,10 +211,8 @@ module IssuesHelper
|
||||||
|
|
||||||
def render_sidebar_queries
|
def render_sidebar_queries
|
||||||
out = ''.html_safe
|
out = ''.html_safe
|
||||||
queries = sidebar_queries.select {|q| !q.is_public?}
|
out << query_links(l(:label_my_queries), sidebar_queries.reject(&:is_public?))
|
||||||
out << query_links(l(:label_my_queries), queries) if queries.any?
|
out << query_links(l(:label_query_plural), sidebar_queries.select(&:is_public?))
|
||||||
queries = sidebar_queries.select {|q| q.is_public?}
|
|
||||||
out << query_links(l(:label_query_plural), queries) if queries.any?
|
|
||||||
out
|
out
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue