@@ -1,7 +1,7 | |||
|
1 | 1 | <div class="contextual"> |
|
2 | 2 | <% if !@query.new_record? && @query.editable_by?(User.current) %> |
|
3 |
<%= link_to l(:button_edit), |
|
|
4 |
<%= link_to l(:button_delete), |
|
|
3 | <%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %> | |
|
4 | <%= link_to l(:button_delete), query_path(@query), :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %> | |
|
5 | 5 | <% end %> |
|
6 | 6 | </div> |
|
7 | 7 | |
@@ -38,7 +38,7 | |||
|
38 | 38 | <%= link_to_function l(:button_apply), 'submit_query_form("query_form")', :class => 'icon icon-checked' %> |
|
39 | 39 | <%= link_to l(:button_clear), { :set_filter => 1, :project_id => @project }, :class => 'icon icon-reload' %> |
|
40 | 40 | <% if @query.new_record? && User.current.allowed_to?(:save_queries, @project, :global => true) %> |
|
41 |
<%= link_to_function l(:button_save), "$('query_form').action='#{ @project ? new_project_query_path |
|
|
41 | <%= link_to_function l(:button_save), "$('query_form').action='#{ @project ? new_project_query_path : new_query_path }'; submit_query_form('query_form')", :class => 'icon icon-save' %> | |
|
42 | 42 | <% end %> |
|
43 | 43 | </p> |
|
44 | 44 | <% end %> |
@@ -1,6 +1,6 | |||
|
1 | 1 | <h2><%= l(:label_query) %></h2> |
|
2 | 2 | |
|
3 |
<% form_tag( |
|
|
3 | <% form_tag(query_path(@query), :onsubmit => 'selectAllOptions("selected_columns");', :method => :put) do %> | |
|
4 | 4 | <%= render :partial => 'form', :locals => {:query => @query} %> |
|
5 | 5 | <%= submit_tag l(:button_save) %> |
|
6 | 6 | <% end %> |
@@ -1,6 +1,6 | |||
|
1 | 1 | <h2><%= l(:label_query_new) %></h2> |
|
2 | 2 | |
|
3 |
<% form_tag(@project ? project_queries_path |
|
|
3 | <% form_tag(@project ? project_queries_path : queries_path, :onsubmit => 'selectAllOptions("selected_columns");') do %> | |
|
4 | 4 | <%= render :partial => 'form', :locals => {:query => @query} %> |
|
5 | 5 | <%= submit_tag l(:button_save) %> |
|
6 | 6 | <% end %> |
@@ -156,7 +156,7 ActionController::Routing::Routes.draw do |map| | |||
|
156 | 156 | project.resources :versions, :shallow => true, :collection => {:close_completed => :put}, :member => {:status_by => :post} |
|
157 | 157 | project.resources :news, :shallow => true |
|
158 | 158 | project.resources :time_entries, :controller => 'timelog', :path_prefix => 'projects/:project_id' |
|
159 |
project.resources :queries, : |
|
|
159 | project.resources :queries, :only => [:new, :create] | |
|
160 | 160 | |
|
161 | 161 | project.wiki_start_page 'wiki', :controller => 'wiki', :action => 'show', :conditions => {:method => :get} |
|
162 | 162 | project.wiki_index 'wiki/index', :controller => 'wiki', :action => 'index', :conditions => {:method => :get} |
@@ -222,13 +222,10 class RoutingTest < ActionController::IntegrationTest | |||
|
222 | 222 | should_route :post, "/projects/redmine/queries", :controller => 'queries', :action => 'create', :project_id => 'redmine' |
|
223 | 223 | |
|
224 | 224 | should_route :get, "/queries/1/edit", :controller => 'queries', :action => 'edit', :id => '1' |
|
225 | should_route :get, "/projects/redmine/queries/1/edit", :controller => 'queries', :action => 'edit', :id => '1', :project_id => 'redmine' | |
|
226 | 225 | |
|
227 | 226 | should_route :put, "/queries/1", :controller => 'queries', :action => 'update', :id => '1' |
|
228 | should_route :put, "/projects/redmine/queries/1", :controller => 'queries', :action => 'update', :id => '1', :project_id => 'redmine' | |
|
229 | 227 | |
|
230 | 228 | should_route :delete, "/queries/1", :controller => 'queries', :action => 'destroy', :id => '1' |
|
231 | should_route :delete, "/projects/redmine/queries/1", :controller => 'queries', :action => 'destroy', :id => '1', :project_id => 'redmine' | |
|
232 | 229 | end |
|
233 | 230 | |
|
234 | 231 | context "repositories" do |
General Comments 0
You need to be logged in to leave comments.
Login now