# redMine - project management software\r
-# Copyright (C) 2006 Jean-Philippe Lang\r
+# Copyright (C) 2006-2007 Jean-Philippe Lang\r
#\r
# This program is free software; you can redistribute it and/or\r
# modify it under the terms of the GNU General Public License\r
:conditions => @query.statement,\r
:limit => @issue_pages.items_per_page,\r
:offset => @issue_pages.current.offset \r
- end\r
+ end \r
+ @trackers = Tracker.find :all\r
render :layout => false if request.xhr?\r
end\r
\r
--- /dev/null
+<% if authorize_for('projects', 'add_issue') %>\r
+<%= start_form_tag({ :controller => 'projects', :action => 'add_issue', :id => @project }, :method => 'get') %>\r
+<%= l(:label_issue_new) %>: <%= select_tag 'tracker_id', ("<option></option>" + options_from_collection_for_select(trackers, 'id', 'name')), :onchange => "if (this.value!='') {this.form.submit();}" %>\r
+<%= end_form_tag %>\r
+<% end %>\r
<% if @query.new_record? %>\r
+ <div class="contextual">\r
+ <%= render :partial => 'issues/add_shortcut', :locals => {:trackers => @trackers } %>\r
+ </div>\r
<h2><%=l(:label_issue_plural)%></h2>\r
\r
<%= start_form_tag({:action => 'list_issues'}, :id => 'query_form') %>\r
</div>\r
<br />\r
<% else %>\r
- <% if authorize_for('projects', 'add_query') %>\r
<div class="contextual">\r
- <%= link_to l(:button_edit), {:controller => 'queries', :action => 'edit', :id => @query}, :class => 'pic picEdit' %>\r
- <%= link_to l(:button_delete), {:controller => 'queries', :action => 'destroy', :id => @query}, :confirm => l(:text_are_you_sure), :post => true, :class => 'pic picDelete' %>\r
+ <%= render :partial => 'issues/add_shortcut', :locals => {:trackers => @trackers } %>\r
+ <% if authorize_for('projects', 'add_query') %>\r
+ <%= link_to l(:button_edit), {:controller => 'queries', :action => 'edit', :id => @query}, :class => 'pic picEdit' %>\r
+ <%= link_to l(:button_delete), {:controller => 'queries', :action => 'destroy', :id => @query}, :confirm => l(:text_are_you_sure), :post => true, :class => 'pic picDelete' %>\r
+ <% end %>\r
</div> \r
- <% end %>\r
<h2><%= @query.name %></h2>\r
<% end %>\r
<%= error_messages_for 'query' %>\r
</ul> \r
\r
<div class="box">\r
+ <div class="contextual">\r
+ <%= render :partial => 'issues/add_shortcut', :locals => {:trackers => @trackers } %>\r
+ </div>\r
<h3><%= image_tag "tracker" %> <%=l(:label_tracker_plural)%></h3>\r
<ul>\r
<% for tracker in @trackers %> \r
<%= lwr(:label_open_issues, issue_count) %>\r
</li>\r
<% end %>\r
- </ul>
- <% if authorize_for 'projects', 'add_issue' %>\r
- » <%=l(:label_issue_new)%>:\r
- <ul>\r
- <% @trackers.each do |tracker| %>\r
- <li><%= link_to tracker.name, :controller => 'projects', :action => 'add_issue', :id => @project, :tracker_id => tracker %></li>\r
- <% end %>\r
- </ul>\r
- <% end %>
+ </ul>\r
<center><small><%= link_to l(:label_issue_view_all), :controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1 %></small></center>\r
</div>
</div>\r