@@ -1,86 +1,85 | |||||
1 | <% if @query.new_record? %> |
|
1 | <% if @query.new_record? %> | |
2 | <div class="contextual"> |
|
2 | <div class="contextual"> | |
3 | <%= link_to l(:label_query_plural), :controller => 'queries', :project_id => @project %> |
|
3 | <%= link_to l(:label_query_plural), :controller => 'queries', :project_id => @project %> | |
4 | <% if authorize_for('projects', 'add_issue') %>| <%= l(:label_issue_new) %>: <%= new_issue_selector %><% end %> |
|
4 | <% if authorize_for('projects', 'add_issue') %>| <%= l(:label_issue_new) %>: <%= new_issue_selector %><% end %> | |
5 | </div> |
|
5 | </div> | |
6 | <h2><%=l(:label_issue_plural)%></h2> |
|
6 | <h2><%=l(:label_issue_plural)%></h2> | |
7 |
|
7 | |||
8 | <% form_tag({:action => 'list_issues'}, :id => 'query_form') do %> |
|
8 | <% form_tag({:action => 'list_issues'}, :id => 'query_form') do %> | |
9 | <%= render :partial => 'queries/filters', :locals => {:query => @query} %> |
|
9 | <%= render :partial => 'queries/filters', :locals => {:query => @query} %> | |
10 | <% end %> |
|
10 | <% end %> | |
11 | <div class="contextual"> |
|
11 | <div class="contextual"> | |
12 | <%= link_to_remote l(:button_apply), |
|
12 | <%= link_to_remote l(:button_apply), | |
13 | { :url => { :controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1 }, |
|
13 | { :url => { :controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1 }, | |
14 | :update => "content", |
|
14 | :update => "content", | |
15 | :with => "Form.serialize('query_form')" |
|
15 | :with => "Form.serialize('query_form')" | |
16 | }, :class => 'icon icon-edit' %> |
|
16 | }, :class => 'icon icon-edit' %> | |
17 |
|
17 | |||
18 | <%= link_to_remote l(:button_clear), |
|
18 | <%= link_to_remote l(:button_clear), | |
19 | { :url => {:controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1}, |
|
19 | { :url => {:controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1}, | |
20 | :update => "content", |
|
20 | :update => "content", | |
21 | }, :class => 'icon icon-reload' %> |
|
21 | }, :class => 'icon icon-reload' %> | |
22 |
|
22 | |||
23 | <% if current_role.allowed_to?(:save_queries) %> |
|
23 | <% if current_role.allowed_to?(:save_queries) %> | |
24 | <%= link_to_remote l(:button_save), |
|
24 | <%= link_to_remote l(:button_save), | |
25 | { :url => { :controller => 'queries', :action => 'new', :project_id => @project }, |
|
25 | { :url => { :controller => 'queries', :action => 'new', :project_id => @project }, | |
26 | :method => 'get', |
|
26 | :method => 'get', | |
27 | :update => "content", |
|
27 | :update => "content", | |
28 | :with => "Form.serialize('query_form')" |
|
28 | :with => "Form.serialize('query_form')" | |
29 | }, :class => 'icon icon-save' %> |
|
29 | }, :class => 'icon icon-save' %> | |
30 | <% end %> |
|
30 | <% end %> | |
31 | </div> |
|
31 | </div> | |
32 | <br /> |
|
32 | <br /> | |
33 | <% else %> |
|
33 | <% else %> | |
34 | <div class="contextual"> |
|
34 | <div class="contextual"> | |
35 | <%= link_to l(:label_query_plural), {:controller => 'queries', :project_id => @project} %> | |
|
35 | <%= link_to l(:label_query_plural), {:controller => 'queries', :project_id => @project} %> | | |
36 | <%= link_to l(:label_issue_view_all), {:controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1} %> |
|
36 | <%= link_to l(:label_issue_view_all), {:controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1} %> | |
37 | <% if authorize_for('projects', 'add_issue') %>| <%= l(:label_issue_new) %>: <%= new_issue_selector %><% end %> |
|
37 | <% if authorize_for('projects', 'add_issue') %>| <%= l(:label_issue_new) %>: <%= new_issue_selector %><% end %> | |
38 | </div> |
|
38 | </div> | |
39 | <h2><%= @query.name %></h2> |
|
39 | <h2><%= @query.name %></h2> | |
40 | <% end %> |
|
40 | <% end %> | |
41 | <%= error_messages_for 'query' %> |
|
41 | <%= error_messages_for 'query' %> | |
42 | <% if @query.valid? %> |
|
42 | <% if @query.valid? %> | |
43 | <% if @issues.empty? %> |
|
43 | <% if @issues.empty? %> | |
44 | <p><i><%= l(:label_no_data) %></i></p> |
|
44 | <p><i><%= l(:label_no_data) %></i></p> | |
45 | <% else %> |
|
45 | <% else %> | |
46 | |
|
46 | | |
47 | <% form_tag({:controller => 'projects', :action => 'move_issues', :id => @project}, :id => 'issues_form' ) do %> |
|
47 | <% form_tag({:controller => 'projects', :action => 'move_issues', :id => @project}, :id => 'issues_form' ) do %> | |
48 | <table class="list"> |
|
48 | <table class="list"> | |
49 | <thead><tr> |
|
49 | <thead><tr> | |
50 | <th></th> |
|
50 | <th></th> | |
51 | <%= sort_header_tag("#{Issue.table_name}.id", :caption => '#') %> |
|
51 | <%= sort_header_tag("#{Issue.table_name}.id", :caption => '#') %> | |
52 | <%= sort_header_tag("#{Issue.table_name}.tracker_id", :caption => l(:field_tracker)) %> |
|
52 | <%= sort_header_tag("#{Issue.table_name}.tracker_id", :caption => l(:field_tracker)) %> | |
53 | <%= sort_header_tag("#{IssueStatus.table_name}.name", :caption => l(:field_status)) %> |
|
53 | <%= sort_header_tag("#{IssueStatus.table_name}.name", :caption => l(:field_status)) %> | |
54 | <%= sort_header_tag("#{Issue.table_name}.priority_id", :caption => l(:field_priority)) %> |
|
54 | <%= sort_header_tag("#{Issue.table_name}.priority_id", :caption => l(:field_priority)) %> | |
55 | <th><%=l(:field_subject)%></th> |
|
55 | <th><%=l(:field_subject)%></th> | |
56 | <%= sort_header_tag("#{User.table_name}.lastname", :caption => l(:field_assigned_to)) %> |
|
56 | <%= sort_header_tag("#{User.table_name}.lastname", :caption => l(:field_assigned_to)) %> | |
57 | <%= sort_header_tag("#{Issue.table_name}.updated_on", :caption => l(:field_updated_on)) %> |
|
57 | <%= sort_header_tag("#{Issue.table_name}.updated_on", :caption => l(:field_updated_on)) %> | |
58 | </tr></thead> |
|
58 | </tr></thead> | |
59 | <tbody> |
|
59 | <tbody> | |
60 | <% for issue in @issues %> |
|
60 | <% for issue in @issues %> | |
61 | <tr class="<%= cycle("odd", "even") %>"> |
|
61 | <tr class="<%= cycle("odd", "even") %>"> | |
62 | <th style="width:15px;"><%= check_box_tag "issue_ids[]", issue.id, false, :id => "issue_#{issue.id}" %></th> |
|
62 | <th style="width:15px;"><%= check_box_tag "issue_ids[]", issue.id, false, :id => "issue_#{issue.id}" %></th> | |
63 | <td align="center"><%= link_to issue.id, :controller => 'issues', :action => 'show', :id => issue %></td> |
|
63 | <td align="center"><%= link_to issue.id, :controller => 'issues', :action => 'show', :id => issue %></td> | |
64 | <td align="center"><%= issue.tracker.name %></td> |
|
64 | <td align="center"><%= issue.tracker.name %></td> | |
65 | <td><div class="square" style="background:#<%= issue.status.html_color %>;"></div> <%= issue.status.name %></td> |
|
65 | <td><div class="square" style="background:#<%= issue.status.html_color %>;"></div> <%= issue.status.name %></td> | |
66 | <td align="center"><%= issue.priority.name %></td> |
|
66 | <td align="center"><%= issue.priority.name %></td> | |
67 | <td><%= "#{issue.project.name} - " unless @project && @project == issue.project %><%= link_to h(issue.subject), :controller => 'issues', :action => 'show', :id => issue %></td> |
|
67 | <td><%= "#{issue.project.name} - " unless @project && @project == issue.project %><%= link_to h(issue.subject), :controller => 'issues', :action => 'show', :id => issue %></td> | |
68 | <td align="center"><%= issue.assigned_to.name if issue.assigned_to %></td> |
|
68 | <td align="center"><%= issue.assigned_to.name if issue.assigned_to %></td> | |
69 | <td align="center"><%= format_time(issue.updated_on) %></td> |
|
69 | <td align="center"><%= format_time(issue.updated_on) %></td> | |
70 | </tr> |
|
70 | </tr> | |
71 | <% end %> |
|
71 | <% end %> | |
72 | </tbody> |
|
72 | </tbody> | |
73 | </table> |
|
73 | </table> | |
74 | <div class="contextual"> |
|
74 | <div class="contextual"> | |
75 | <%= l(:label_export_to) %> |
|
75 | <%= l(:label_export_to) %> | |
76 | <%= link_to 'CSV', {:action => 'export_issues_csv', :id => @project}, :class => 'icon icon-csv' %>, |
|
76 | <%= link_to 'CSV', {:action => 'export_issues_csv', :id => @project}, :class => 'icon icon-csv' %>, | |
77 | <%= link_to 'PDF', {:action => 'export_issues_pdf', :id => @project}, :class => 'icon icon-pdf' %> |
|
77 | <%= link_to 'PDF', {:action => 'export_issues_pdf', :id => @project}, :class => 'icon icon-pdf' %> | |
78 | </div> |
|
78 | </div> | |
79 |
<p><%= submit_tag |
|
79 | <p><%= submit_tag(l(:button_move), :class => "button-small") if authorize_for('projects', 'move_issues') %> | |
80 | |
|
|||
81 | <%= pagination_links_full @issue_pages %> |
|
80 | <%= pagination_links_full @issue_pages %> | |
82 | [ <%= @issue_pages.current.first_item %> - <%= @issue_pages.current.last_item %> / <%= @issue_count %> ] |
|
81 | [ <%= @issue_pages.current.first_item %> - <%= @issue_pages.current.last_item %> / <%= @issue_count %> ] | |
83 | </p> |
|
82 | </p> | |
84 | <% end %> |
|
83 | <% end %> | |
85 | <% end %> |
|
84 | <% end %> | |
86 | <% end %> |
|
85 | <% end %> |
General Comments 0
You need to be logged in to leave comments.
Login now