@@ -172,7 +172,7 class TimelogController < ApplicationController | |||||
172 | @time_entry.attributes = params[:time_entry] |
|
172 | @time_entry.attributes = params[:time_entry] | |
173 | if request.post? and @time_entry.save |
|
173 | if request.post? and @time_entry.save | |
174 | flash[:notice] = l(:notice_successful_update) |
|
174 | flash[:notice] = l(:notice_successful_update) | |
175 | redirect_to :action => 'details', :project_id => @time_entry.project |
|
175 | redirect_to(params[:back_url] || {:action => 'details', :project_id => @time_entry.project}) | |
176 | return |
|
176 | return | |
177 | end |
|
177 | end | |
178 | @activities = Enumeration::get_values('ACTI') |
|
178 | @activities = Enumeration::get_values('ACTI') |
@@ -427,6 +427,10 module ApplicationHelper | |||||
427 | form_for(name, object, options.merge({ :builder => TabularFormBuilder, :lang => current_language}), &proc) |
|
427 | form_for(name, object, options.merge({ :builder => TabularFormBuilder, :lang => current_language}), &proc) | |
428 | end |
|
428 | end | |
429 |
|
429 | |||
|
430 | def back_url_hidden_field_tag | |||
|
431 | hidden_field_tag 'back_url', (params[:back_url] || request.env['HTTP_REFERER']) | |||
|
432 | end | |||
|
433 | ||||
430 | def check_all_links(form_name) |
|
434 | def check_all_links(form_name) | |
431 | link_to_function(l(:button_check_all), "checkAll('#{form_name}', true)") + |
|
435 | link_to_function(l(:button_check_all), "checkAll('#{form_name}', true)") + | |
432 | " | " + |
|
436 | " | " + |
@@ -2,6 +2,7 | |||||
2 |
|
2 | |||
3 | <% labelled_tabular_form_for :time_entry, @time_entry, :url => {:action => 'edit', :project_id => @time_entry.project} do |f| %> |
|
3 | <% labelled_tabular_form_for :time_entry, @time_entry, :url => {:action => 'edit', :project_id => @time_entry.project} do |f| %> | |
4 | <%= error_messages_for 'time_entry' %> |
|
4 | <%= error_messages_for 'time_entry' %> | |
|
5 | <%= back_url_hidden_field_tag %> | |||
5 |
|
6 | |||
6 | <div class="box"> |
|
7 | <div class="box"> | |
7 | <p><%= f.text_field :issue_id, :size => 6 %> <em><%= h("#{@time_entry.issue.tracker.name} ##{@time_entry.issue.id}: #{@time_entry.issue.subject}") if @time_entry.issue %></em></p> |
|
8 | <p><%= f.text_field :issue_id, :size => 6 %> <em><%= h("#{@time_entry.issue.tracker.name} ##{@time_entry.issue.id}: #{@time_entry.issue.subject}") if @time_entry.issue %></em></p> |
General Comments 0
You need to be logged in to leave comments.
Login now