2006-12-16 16:37:32 +03:00
|
|
|
<% if @query.new_record? %>
|
2007-01-02 12:58:07 +03:00
|
|
|
<div class="contextual">
|
|
|
|
<%= render :partial => 'issues/add_shortcut', :locals => {:trackers => @trackers } %>
|
|
|
|
</div>
|
2006-12-16 16:37:32 +03:00
|
|
|
<h2><%=l(:label_issue_plural)%></h2>
|
|
|
|
|
2007-01-26 22:56:25 +03:00
|
|
|
<% form_tag({:action => 'list_issues'}, :id => 'query_form') do %>
|
2006-12-16 16:37:32 +03:00
|
|
|
<%= render :partial => 'queries/filters', :locals => {:query => @query} %>
|
2007-01-26 22:56:25 +03:00
|
|
|
<% end %>
|
2006-12-16 16:37:32 +03:00
|
|
|
<div class="contextual">
|
|
|
|
<%= link_to_remote l(:button_apply),
|
|
|
|
{ :url => { :controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1 },
|
|
|
|
:update => "content",
|
|
|
|
:with => "Form.serialize('query_form')"
|
2007-01-08 22:21:59 +03:00
|
|
|
}, :class => 'icon icon-edit' %>
|
2006-12-16 16:37:32 +03:00
|
|
|
|
2007-01-08 22:21:59 +03:00
|
|
|
<%= link_to l(:button_clear), {:controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1}, :class => 'icon icon-del' %>
|
2006-12-16 16:37:32 +03:00
|
|
|
<% if authorize_for('projects', 'add_query') %>
|
|
|
|
|
|
|
|
<%= link_to_remote l(:button_save),
|
|
|
|
{ :url => { :controller => 'projects', :action => "add_query", :id => @project },
|
|
|
|
:method => 'get',
|
|
|
|
:update => "content",
|
|
|
|
:with => "Form.serialize('query_form')"
|
2007-01-08 22:21:59 +03:00
|
|
|
}, :class => 'icon icon-save' %>
|
2006-12-16 16:37:32 +03:00
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<br />
|
|
|
|
<% else %>
|
|
|
|
<div class="contextual">
|
2007-01-02 12:58:07 +03:00
|
|
|
<%= render :partial => 'issues/add_shortcut', :locals => {:trackers => @trackers } %>
|
|
|
|
<% if authorize_for('projects', 'add_query') %>
|
2007-01-08 22:21:59 +03:00
|
|
|
<%= link_to l(:button_edit), {:controller => 'queries', :action => 'edit', :id => @query}, :class => 'icon icon-edit' %>
|
2007-01-27 00:09:27 +03:00
|
|
|
<%= link_to l(:button_delete), {:controller => 'queries', :action => 'destroy', :id => @query}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
|
2007-01-02 12:58:07 +03:00
|
|
|
<% end %>
|
2006-12-16 16:37:32 +03:00
|
|
|
</div>
|
|
|
|
<h2><%= @query.name %></h2>
|
|
|
|
<% end %>
|
|
|
|
<%= error_messages_for 'query' %>
|
|
|
|
<% if @query.valid? %>
|
2006-12-16 16:45:56 +03:00
|
|
|
<% if @issues.empty? %>
|
|
|
|
<p><i><%= l(:label_no_data) %></i></p>
|
|
|
|
<% else %>
|
2006-12-16 16:37:32 +03:00
|
|
|
|
2007-01-26 22:56:25 +03:00
|
|
|
<% form_tag({:controller => 'projects', :action => 'move_issues', :id => @project}, :id => 'issues_form' ) do %>
|
2006-12-24 19:35:25 +03:00
|
|
|
<table class="list">
|
|
|
|
<thead><tr>
|
|
|
|
<th></th>
|
2006-07-29 23:54:22 +04:00
|
|
|
<%= sort_header_tag('issues.id', :caption => '#') %>
|
|
|
|
<%= sort_header_tag('issues.tracker_id', :caption => l(:field_tracker)) %>
|
2006-12-24 19:35:25 +03:00
|
|
|
<%= sort_header_tag('issue_statuses.name', :caption => l(:field_status)) %>
|
2007-02-02 16:56:49 +03:00
|
|
|
<%= sort_header_tag('issues.priority_id', :caption => l(:field_priority)) %>
|
2006-07-29 23:54:22 +04:00
|
|
|
<th><%=l(:field_subject)%></th>
|
|
|
|
<%= sort_header_tag('users.lastname', :caption => l(:field_author)) %>
|
|
|
|
<%= sort_header_tag('issues.updated_on', :caption => l(:field_updated_on)) %>
|
2006-12-24 19:35:25 +03:00
|
|
|
</tr></thead>
|
|
|
|
<tbody>
|
2006-07-29 23:54:22 +04:00
|
|
|
<% for issue in @issues %>
|
2006-12-05 00:31:14 +03:00
|
|
|
<tr class="<%= cycle("odd", "even") %>">
|
2007-01-05 22:10:57 +03:00
|
|
|
<th style="width:15px;"><%= check_box_tag "issue_ids[]", issue.id, false, :id => "issue_#{issue.id}" %></th>
|
2006-12-24 19:35:25 +03:00
|
|
|
<td align="center"><%= link_to issue.id, :controller => 'issues', :action => 'show', :id => issue %></td>
|
2006-07-29 23:54:22 +04:00
|
|
|
<td align="center"><%= issue.tracker.name %></td>
|
2006-12-24 19:35:25 +03:00
|
|
|
<td><div class="square" style="background:#<%= issue.status.html_color %>;"></div> <%= issue.status.name %></td>
|
2007-02-02 16:56:49 +03:00
|
|
|
<td align="center"><%= issue.priority.name %></td>
|
2006-12-17 11:10:18 +03:00
|
|
|
<td><%= link_to h(issue.subject), :controller => 'issues', :action => 'show', :id => issue %></td>
|
2007-02-02 16:56:49 +03:00
|
|
|
<td align="center"><%= issue.author.display_name %></td>
|
2006-07-29 23:54:22 +04:00
|
|
|
<td align="center"><%= format_time(issue.updated_on) %></td>
|
|
|
|
</tr>
|
2006-12-24 19:35:25 +03:00
|
|
|
<% end %>
|
|
|
|
</tbody>
|
2006-07-29 23:54:22 +04:00
|
|
|
</table>
|
2006-12-16 16:37:32 +03:00
|
|
|
<div class="contextual">
|
|
|
|
<%= l(:label_export_to) %>
|
2007-01-08 22:21:59 +03:00
|
|
|
<%= link_to 'CSV', {:action => 'export_issues_csv', :id => @project}, :class => 'icon icon-csv' %>,
|
|
|
|
<%= link_to 'PDF', {:action => 'export_issues_pdf', :id => @project}, :class => 'icon icon-pdf' %>
|
2006-12-16 16:37:32 +03:00
|
|
|
</div>
|
2007-01-05 22:10:57 +03:00
|
|
|
<p><%= submit_tag l(:button_move), :class => "button-small" %>
|
2006-12-24 19:35:25 +03:00
|
|
|
|
2006-07-29 23:54:22 +04:00
|
|
|
<%= pagination_links_full @issue_pages %>
|
|
|
|
[ <%= @issue_pages.current.first_item %> - <%= @issue_pages.current.last_item %> / <%= @issue_count %> ]
|
2007-01-05 22:10:57 +03:00
|
|
|
</p>
|
2007-01-26 22:56:25 +03:00
|
|
|
<% end %>
|
2006-12-16 16:45:56 +03:00
|
|
|
<% end %>
|
2006-12-16 16:37:32 +03:00
|
|
|
<% end %>
|