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