Project

General

Profile

RE: Show Issue Descriptions plugin ยป index.rhtml

Terence Mill, 2011-07-15 06:57

 
1
<div class="contextual">
2
<% if !@query.new_record? && @query.editable_by?(User.current) %>
3
	<%= link_to l(:button_edit), {:controller => 'queries', :action => 'edit', :id => @query}, :class => 'icon icon-edit' %>
4
	<%= link_to l(:button_delete), {:controller => 'queries', :action => 'destroy', :id => @query}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
5
<% end %>
6
</div>
7

    
8
<h2><%= @query.new_record? ? l(:label_issue_plural) : h(@query.name) %></h2>
9
<% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %>
10

    
11
<% form_tag({ :controller => 'issues', :action => 'index', :project_id => @project }, :method => :get, :id => 'query_form') do %>
12
    <%= hidden_field_tag 'set_filter', '1' %>
13
		<div id="query_form_content" class="hide-when-print">
14
    <fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
15
    	<legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
16
    	<div style="<%= @query.new_record? ? "" : "display: none;" %>">
17
    		<%= render :partial => 'queries/filters', :locals => {:query => @query} %>
18
    	</div>
19
    </fieldset>
20
    <fieldset class="collapsible collapsed">
21
    	<legend onclick="toggleFieldset(this);"><%= l(:label_options) %></legend>
22
    	<div style="display: none;">
23
    		<table>
24
    			<tr>
25
    				<td><%= l(:field_column_names) %></td>
26
						<td><%= render :partial => 'queries/columns', :locals => {:query => @query} %></td>
27
					</tr>
28
					<tr>
29
						<td><%= l(:field_group_by) %></td>
30
						<td><%= select_tag('group_by', options_for_select([[]] + @query.groupable_columns.collect {|c| [c.caption, c.name.to_s]}, @query.group_by)) %></td>
31
					</tr>
32
          <tr>
33
						<td><%= l(:label_rendering_parameter_plural) %></td>
34
            <td <%= render :partial => 'queries/custom_params', :locals => {:query => @query} %></td>
35
          </tr>
36
				</table>
37
			</div>
38
		</fieldset>
39
		</div>
40
    <p class="buttons hide-when-print">
41

    
42
    <%= link_to_function l(:button_apply), 'submit_query_form("query_form")', :class => 'icon icon-checked' %>
43
                       
44
    <%= link_to l(:button_clear), { :set_filter => 1, :project_id => @project }, :class => 'icon icon-reload'  %>
45
                       
46
    <% if @query.new_record? && User.current.allowed_to?(:save_queries, @project, :global => true) %>
47
    <%= link_to_function l(:button_save), "$('query_form').action='#{ url_for :controller => 'queries', :action => 'new', :project_id => @project }'; submit_query_form('query_form')", :class => 'icon icon-save' %>
48
    <% end %>
49
    </p>
50
<% end %>
51

    
52
<%= error_messages_for 'query' %>
53
<% if @query.valid? %>
54
<% if @issues.empty? %>
55
<p class="nodata"><%= l(:label_no_data) %></p>
56
<% else %>
57
<%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query} %>
58
<p class="pagination"><%= pagination_links_full @issue_pages, @issue_count %></p>
59
<% end %>
60

    
61
<% other_formats_links do |f| %>
62
	<%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %>
63
	<%= f.link_to 'CSV', :url => params %>
64
	<%= f.link_to 'PDF', :url => params %>
65
<% end %>
66

    
67
<% end %>
68
<%= call_hook(:view_issues_index_bottom, { :issues => @issues, :project => @project, :query => @query }) %>
69

    
70
<% content_for :sidebar do %>
71
    <%= render :partial => 'issues/sidebar' %>
72
<% end %>
73

    
74
<% content_for :header_tags do %>
75
    <%= auto_discovery_link_tag(:atom, {:query_id => @query, :format => 'atom', :page => nil, :key => User.current.rss_key}, :title => l(:label_issue_plural)) %>
76
    <%= auto_discovery_link_tag(:atom, {:controller => 'journals', :action => 'index', :query_id => @query, :format => 'atom', :page => nil, :key => User.current.rss_key}, :title => l(:label_changes_details)) %>
77
<% end %>
78

    
79
<%= context_menu issues_context_menu_path %>
    (1-1/1)