mirror of
https://github.com/redmine/redmine.git
synced 2025-11-08 14:26:04 +01:00
Removed deep nested time entries routes.
git-svn-id: http://svn.redmine.org/redmine/trunk@13609 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<h2><%= l(:label_spent_time) %></h2>
|
<h2><%= l(:label_spent_time) %></h2>
|
||||||
|
|
||||||
<%= labelled_form_for @time_entry, :url => project_time_entry_path(@time_entry.project, @time_entry) do |f| %>
|
<%= labelled_form_for @time_entry, :url => time_entry_path(@time_entry) do |f| %>
|
||||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||||
<%= submit_tag l(:button_save) %>
|
<%= submit_tag l(:button_save) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ Rails.application.routes.draw do
|
|||||||
get 'versions', :to => 'versions#index'
|
get 'versions', :to => 'versions#index'
|
||||||
|
|
||||||
resources :news, :except => [:show, :edit, :update, :destroy]
|
resources :news, :except => [:show, :edit, :update, :destroy]
|
||||||
resources :time_entries, :controller => 'timelog' do
|
resources :time_entries, :controller => 'timelog', :except => [:show, :edit, :update, :destroy] do
|
||||||
get 'report', :on => :collection
|
get 'report', :on => :collection
|
||||||
end
|
end
|
||||||
resources :queries, :only => [:new, :create]
|
resources :queries, :only => [:new, :create]
|
||||||
@@ -171,7 +171,7 @@ Rails.application.routes.draw do
|
|||||||
match 'bulk_edit', :via => [:get, :post]
|
match 'bulk_edit', :via => [:get, :post]
|
||||||
post 'bulk_update'
|
post 'bulk_update'
|
||||||
end
|
end
|
||||||
resources :time_entries, :controller => 'timelog' do
|
resources :time_entries, :controller => 'timelog', :except => [:show, :edit, :update, :destroy] do
|
||||||
collection do
|
collection do
|
||||||
get 'report'
|
get 'report'
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -100,8 +100,7 @@ class TimelogControllerTest < ActionController::TestCase
|
|||||||
get :edit, :id => 2, :project_id => nil
|
get :edit, :id => 2, :project_id => nil
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_template 'edit'
|
assert_template 'edit'
|
||||||
# Default activity selected
|
assert_tag :tag => 'form', :attributes => { :action => '/time_entries/2' }
|
||||||
assert_tag :tag => 'form', :attributes => { :action => '/projects/ecookbook/time_entries/2' }
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_get_edit_with_an_existing_time_entry_with_inactive_activity
|
def test_get_edit_with_an_existing_time_entry_with_inactive_activity
|
||||||
|
|||||||
@@ -36,11 +36,6 @@ class RoutingTimelogsTest < Redmine::RoutingTest
|
|||||||
should_route 'GET /projects/foo/time_entries.atom' => 'timelog#index', :project_id => 'foo', :format => 'atom'
|
should_route 'GET /projects/foo/time_entries.atom' => 'timelog#index', :project_id => 'foo', :format => 'atom'
|
||||||
should_route 'GET /projects/foo/time_entries/new' => 'timelog#new', :project_id => 'foo'
|
should_route 'GET /projects/foo/time_entries/new' => 'timelog#new', :project_id => 'foo'
|
||||||
should_route 'POST /projects/foo/time_entries' => 'timelog#create', :project_id => 'foo'
|
should_route 'POST /projects/foo/time_entries' => 'timelog#create', :project_id => 'foo'
|
||||||
|
|
||||||
# TODO: unused?
|
|
||||||
should_route 'GET /projects/foo/time_entries/22/edit' => 'timelog#edit', :project_id => 'foo', :id => '22'
|
|
||||||
should_route 'PUT /projects/foo/time_entries/22' => 'timelog#update', :project_id => 'foo', :id => '22'
|
|
||||||
should_route 'DELETE /projects/foo/time_entries/22' => 'timelog#destroy', :project_id => 'foo', :id => '22'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_timelogs_scoped_under_issues
|
def test_timelogs_scoped_under_issues
|
||||||
@@ -49,11 +44,6 @@ class RoutingTimelogsTest < Redmine::RoutingTest
|
|||||||
should_route 'GET /issues/234/time_entries.atom' => 'timelog#index', :issue_id => '234', :format => 'atom'
|
should_route 'GET /issues/234/time_entries.atom' => 'timelog#index', :issue_id => '234', :format => 'atom'
|
||||||
should_route 'GET /issues/234/time_entries/new' => 'timelog#new', :issue_id => '234'
|
should_route 'GET /issues/234/time_entries/new' => 'timelog#new', :issue_id => '234'
|
||||||
should_route 'POST /issues/234/time_entries' => 'timelog#create', :issue_id => '234'
|
should_route 'POST /issues/234/time_entries' => 'timelog#create', :issue_id => '234'
|
||||||
|
|
||||||
# TODO: unused?
|
|
||||||
should_route 'GET /issues/234/time_entries/22/edit' => 'timelog#edit', :issue_id => '234', :id => '22'
|
|
||||||
should_route 'PUT /issues/234/time_entries/22' => 'timelog#update', :issue_id => '234', :id => '22'
|
|
||||||
should_route 'DELETE /issues/234/time_entries/22' => 'timelog#destroy', :issue_id => '234', :id => '22'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_timelogs_report
|
def test_timelogs_report
|
||||||
|
|||||||
Reference in New Issue
Block a user