|
@ -21,7 +21,7 @@ class UserLogs < Netzke::Basepack::Grid |
|
|
user_log_data_store = {auto_load: true } |
|
|
user_log_data_store = {auto_load: true } |
|
|
#admins and staff |
|
|
#admins and staff |
|
|
else |
|
|
else |
|
|
user_log_scope = lambda { |rel| puts session.inspect; rel.where(:loggable_type => 'User',:loggable_id => session[:selected_user_id]);} |
|
|
user_log_scope = lambda { |rel| rel.where(:loggable_type => 'User',:loggable_id => session[:selected_user_id]);} |
|
|
user_log_strong_default_attrs.merge!( { :loggable_id => session[:selected_user_id] } ) |
|
|
user_log_strong_default_attrs.merge!( { :loggable_id => session[:selected_user_id] } ) |
|
|
user_log_data_store = {auto_load: true } |
|
|
user_log_data_store = {auto_load: true } |
|
|
end |
|
|
end |
|
@ -30,9 +30,8 @@ class UserLogs < Netzke::Basepack::Grid |
|
|
c.title = "User History" |
|
|
c.title = "User History" |
|
|
c.data_store = user_log_data_store |
|
|
c.data_store = user_log_data_store |
|
|
c.scope = user_log_scope |
|
|
c.scope = user_log_scope |
|
|
puts "user_log_strong_default_attrs" |
|
|
|
|
|
puts user_log_strong_default_attrs.inspect |
|
|
|
|
|
c.strong_default_attrs = user_log_strong_default_attrs |
|
|
c.strong_default_attrs = user_log_strong_default_attrs |
|
|
|
|
|
|
|
|
c.columns = [ |
|
|
c.columns = [ |
|
|
{ :name => :start_date, :format => "g:ia - D, M j - Y", :width => 165, :default_value => Time.now.to_formatted_s(:db) }, |
|
|
{ :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, :hidden => true, :default_value => Time.now.to_formatted_s(:db) }, |
|
|