Browse Source

Merge pull request #48 from spacemunkay/denney-add-end-date-user-timesheet

Added end date to user timesheet, removed created & updated
eperez-timeinput
Jason Denney 11 years ago
parent
commit
aaa6fda90c
  1. 4
      app/components/user_logs.rb

4
app/components/user_logs.rb

@ -40,12 +40,10 @@ class UserLogs < Netzke::Basepack::Grid
c.columns = [
{ :name => :start_date, :format => "g:ia - D, M j - Y", :width => 165, :default_value => Time.now.to_formatted_s(:db) },
{ :name => :end_date, :hidden => true, :default_value => Time.now.to_formatted_s(:db) },
{ :name => :end_date, :format => "g:ia - D, M j - Y", :default_value => Time.now.to_formatted_s(:db) },
{ :name => :hours, :getter => lambda { |rec| (rec.end_date - rec.start_date)/3600 }, :sorting_scope => :sort_by_duration},
:description,
{ :name => :user_action__action, :text => 'Action', :default_value => ::ActsAsLoggable::UserAction.all.first.id },
:created_at,
:updated_at,
{ :name => :logged_by, :getter => lambda{ |rec|
user = User.find_by_id(rec.logger_id)
user.nil? ? "" : "#{user.first_name} #{user.last_name}"

Loading…
Cancel
Save