Commit cb9b82fc authored by jplang's avatar jplang
Browse files

Load queries from the helper.

git-svn-id: https://svn.redmine.org/redmine/trunk@16416 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 07f6a6f3
......@@ -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
......
<% 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>
......
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