Feature #588 » timelog_controller.rb.patch
| timelog_controller.rb (working copy) | ||
|---|---|---|
| 125 | 125 | end | 
| 126 | 126 |     @activities = Enumeration::get_values('ACTI')
 | 
| 127 | 127 | end | 
| 128 |  | |
| 129 | # Delete @timelog | |
| 130 | def destroy | |
| 131 | render_404 and return if @time_entry && @time_entry.user != User.current | |
| 132 | @time_entry_to_destroy = @time_entry | |
| 133 | if request.post? and params[:confirm] | |
| 134 | @time_entry_to_destroy.destroy | |
| 135 | redirect_to :controller => 'my', :action => 'page' | |
| 136 | end | |
| 137 | #hide time_entry in layout | |
| 138 | @time_entry = nil | |
| 139 | end | |
| 140 |  | |
| 128 | 141 | |
| 129 | 142 | private | 
| 130 | 143 | def find_project |