Index: timelog_controller.rb =================================================================== --- timelog_controller.rb (revision 1128) +++ timelog_controller.rb (working copy) @@ -125,6 +125,19 @@ end @activities = Enumeration::get_values('ACTI') end + + # Delete @timelog + def destroy + render_404 and return if @time_entry && @time_entry.user != User.current + @time_entry_to_destroy = @time_entry + if request.post? and params[:confirm] + @time_entry_to_destroy.destroy + redirect_to :controller => 'my', :action => 'page' + end + #hide time_entry in layout + @time_entry = nil + end + private def find_project