mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-05 23:21:31 +00:00
git-svn-id: http://svn.redmine.org/redmine/trunk@16406 e93f8b46-1217-0410-a6f0-8f06a7374b81
69 lines
1.9 KiB
Plaintext
69 lines
1.9 KiB
Plaintext
<% issues, query = issues_items(block, settings) %>
|
|
|
|
<% if query %>
|
|
<div class="contextual">
|
|
<%= link_to_function l(:label_options), "$('##{block}-settings').toggle();", :class => 'icon-only icon-settings', :title => l(:label_options) %>
|
|
</div>
|
|
|
|
<h3>
|
|
<%= link_to query.name, issues_path(query.as_params) %>
|
|
(<%= query.issue_count %>)
|
|
</h3>
|
|
|
|
<div id="<%= block %>-settings" style="display:none;">
|
|
<%= form_tag(my_page_path, :remote => true) do %>
|
|
<div class="box">
|
|
<%= render_query_columns_selection(query, :name => "settings[#{block}][columns]") %>
|
|
</div>
|
|
<p>
|
|
<%= submit_tag l(:button_save) %>
|
|
<%= link_to_function l(:button_cancel), "$('##{block}-settings').toggle();" %>
|
|
</p>
|
|
<% end %>
|
|
</div>
|
|
|
|
<% if issues.any? %>
|
|
<%= render :partial => 'issues/list',
|
|
:locals => {
|
|
:issues => issues,
|
|
:query => query,
|
|
:query_options => {
|
|
:sort_param => "settings[#{block}][sort]",
|
|
:sort_link_options => {:method => :post, :remote => true}
|
|
}
|
|
} %>
|
|
<% else %>
|
|
<p class="nodata"><%= l(:label_no_data) %></p>
|
|
<% end %>
|
|
|
|
<% content_for :header_tags do %>
|
|
<%= auto_discovery_link_tag(:atom,
|
|
issues_path(query.as_params.merge(:format => 'atom', :key => User.current.rss_key)),
|
|
{:title => query.name}) %>
|
|
<% end %>
|
|
|
|
<% else %>
|
|
<% visible_queries = IssueQuery.visible.sorted %>
|
|
|
|
<h3>
|
|
<%= l(:label_issue_plural) %>
|
|
</h3>
|
|
|
|
<div id="<%= block %>-settings">
|
|
<%= form_tag(my_page_path, :remote => true) do %>
|
|
<div class="box">
|
|
<p>
|
|
<label>
|
|
<%= l(:label_query) %>
|
|
<%= select_tag 'settings[issuequery][query_id]', content_tag("option") + options_from_collection_for_select(visible_queries, :id, :name, settings[:query_id]) %>
|
|
</label>
|
|
</p>
|
|
</div>
|
|
<p>
|
|
<%= submit_tag l(:button_save) %>
|
|
</p>
|
|
<% end %>
|
|
</div>
|
|
|
|
<% end %>
|