diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/my_helper.rb | 3 | ||||
-rw-r--r-- | app/views/my/blocks/_issue_query_selection.html.erb | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/app/helpers/my_helper.rb b/app/helpers/my_helper.rb index e49afc21b..c16fe09f9 100644 --- a/app/helpers/my_helper.rb +++ b/app/helpers/my_helper.rb @@ -132,7 +132,8 @@ module MyHelper issues = query.issues(:limit => 10) render :partial => 'my/blocks/issues', :locals => {:query => query, :issues => issues, :block => block, :settings => settings} else - render :partial => 'my/blocks/issue_query_selection', :locals => {:block => block, :settings => settings} + queries = IssueQuery.visible.sorted + render :partial => 'my/blocks/issue_query_selection', :locals => {:queries => queries, :block => block, :settings => settings} end end diff --git a/app/views/my/blocks/_issue_query_selection.html.erb b/app/views/my/blocks/_issue_query_selection.html.erb index 64a3f32af..640f049b0 100644 --- a/app/views/my/blocks/_issue_query_selection.html.erb +++ b/app/views/my/blocks/_issue_query_selection.html.erb @@ -1,5 +1,3 @@ -<% visible_queries = IssueQuery.visible.sorted %> - <h3> <%= l(:label_issue_plural) %> </h3> @@ -10,7 +8,7 @@ <p> <label> <%= l(:label_query) %> - <%= select_tag "settings[#{block}][query_id]", content_tag("option") + options_from_collection_for_select(visible_queries, :id, :name, settings[:query_id]) %> + <%= select_tag "settings[#{block}][query_id]", content_tag("option") + options_from_collection_for_select(queries, :id, :name, settings[:query_id]) %> </label> </p> </div> |