@@ -1,6 +1,6 | |||
|
1 | 1 | <h2><%= l(:label_spent_time) %></h2> |
|
2 | 2 | |
|
3 |
<%= labelled_form_for @time_entry, :url => |
|
|
3 | <%= labelled_form_for @time_entry, :url => time_entry_path(@time_entry) do |f| %> | |
|
4 | 4 | <%= render :partial => 'form', :locals => {:f => f} %> |
|
5 | 5 | <%= submit_tag l(:button_save) %> |
|
6 | 6 | <% end %> |
@@ -126,7 +126,7 Rails.application.routes.draw do | |||
|
126 | 126 | get 'versions', :to => 'versions#index' |
|
127 | 127 | |
|
128 | 128 | resources :news, :except => [:show, :edit, :update, :destroy] |
|
129 | resources :time_entries, :controller => 'timelog' do | |
|
129 | resources :time_entries, :controller => 'timelog', :except => [:show, :edit, :update, :destroy] do | |
|
130 | 130 | get 'report', :on => :collection |
|
131 | 131 | end |
|
132 | 132 | resources :queries, :only => [:new, :create] |
@@ -171,7 +171,7 Rails.application.routes.draw do | |||
|
171 | 171 | match 'bulk_edit', :via => [:get, :post] |
|
172 | 172 | post 'bulk_update' |
|
173 | 173 | end |
|
174 | resources :time_entries, :controller => 'timelog' do | |
|
174 | resources :time_entries, :controller => 'timelog', :except => [:show, :edit, :update, :destroy] do | |
|
175 | 175 | collection do |
|
176 | 176 | get 'report' |
|
177 | 177 | end |
@@ -100,8 +100,7 class TimelogControllerTest < ActionController::TestCase | |||
|
100 | 100 | get :edit, :id => 2, :project_id => nil |
|
101 | 101 | assert_response :success |
|
102 | 102 | assert_template 'edit' |
|
103 | # Default activity selected | |
|
104 | assert_tag :tag => 'form', :attributes => { :action => '/projects/ecookbook/time_entries/2' } | |
|
103 | assert_tag :tag => 'form', :attributes => { :action => '/time_entries/2' } | |
|
105 | 104 | end |
|
106 | 105 | |
|
107 | 106 | def test_get_edit_with_an_existing_time_entry_with_inactive_activity |
@@ -36,11 +36,6 class RoutingTimelogsTest < Redmine::RoutingTest | |||
|
36 | 36 | should_route 'GET /projects/foo/time_entries.atom' => 'timelog#index', :project_id => 'foo', :format => 'atom' |
|
37 | 37 | should_route 'GET /projects/foo/time_entries/new' => 'timelog#new', :project_id => 'foo' |
|
38 | 38 | should_route 'POST /projects/foo/time_entries' => 'timelog#create', :project_id => 'foo' |
|
39 | ||
|
40 | # TODO: unused? | |
|
41 | should_route 'GET /projects/foo/time_entries/22/edit' => 'timelog#edit', :project_id => 'foo', :id => '22' | |
|
42 | should_route 'PUT /projects/foo/time_entries/22' => 'timelog#update', :project_id => 'foo', :id => '22' | |
|
43 | should_route 'DELETE /projects/foo/time_entries/22' => 'timelog#destroy', :project_id => 'foo', :id => '22' | |
|
44 | 39 | end |
|
45 | 40 | |
|
46 | 41 | def test_timelogs_scoped_under_issues |
@@ -49,11 +44,6 class RoutingTimelogsTest < Redmine::RoutingTest | |||
|
49 | 44 | should_route 'GET /issues/234/time_entries.atom' => 'timelog#index', :issue_id => '234', :format => 'atom' |
|
50 | 45 | should_route 'GET /issues/234/time_entries/new' => 'timelog#new', :issue_id => '234' |
|
51 | 46 | should_route 'POST /issues/234/time_entries' => 'timelog#create', :issue_id => '234' |
|
52 | ||
|
53 | # TODO: unused? | |
|
54 | should_route 'GET /issues/234/time_entries/22/edit' => 'timelog#edit', :issue_id => '234', :id => '22' | |
|
55 | should_route 'PUT /issues/234/time_entries/22' => 'timelog#update', :issue_id => '234', :id => '22' | |
|
56 | should_route 'DELETE /issues/234/time_entries/22' => 'timelog#destroy', :issue_id => '234', :id => '22' | |
|
57 | 47 | end |
|
58 | 48 | |
|
59 | 49 | def test_timelogs_report |
General Comments 0
You need to be logged in to leave comments.
Login now