Sha256: cec2fdb9b528dc17e686c959fdef6506ca51059794cf68b249e8f219f2972a07

Contents?: true

Size: 1.24 KB

Versions: 48

Compression:

Stored size: 1.24 KB

Contents

unless user.new_record?
  json.set! 'DT_RowId', "user_#{user.id}"
  json.set! 'DT_Path', user_path(user)
  if user.destroyed?
    json.set! 'DT_RowAction', 'remove'
  end
  if user.enabled?
    if user.failed_login_streak.count > 5
      json.set! 'DT_RowClass', 'cell-danger'
    else
      unless user.activated?
        json.set! 'DT_RowClass', 'cell-info'
      end
    end
  else
    json.set! 'DT_RowClass', 'cell-warning'
  end
end
json.set! 'name', h(user.name)
json.set! 'email', h(user.email)
json.set! 'created_at', user.created_at
json.set! 'updated_at', user.updated_at
json.set! 'activated', user.activated?
json.set! 'system_admin', user.system_admin?
json.set! 'enabled', user.enabled?
json.set! 'comments', h(user.comments).gsub("\n", "<br>\n")
json.set! 'show_edit', current_user?(user) || system_admin?
json.set! 'show_disable', !current_user?(user) && system_admin? && user.enabled?
json.set! 'show_enable', !current_user?(user) && system_admin? && !user.enabled?
json.set! 'show_delete', !current_user?(user) && system_admin? && !user.enabled? && user.disabled_at < 7.days.ago
json.set! 'show_promote', !current_user?(user) && system_admin? && !user.system_admin?
json.set! 'show_demote', !current_user?(user) && system_admin? && user.system_admin?

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
incline-0.3.14 app/views/incline/users/_details.json.jbuilder
incline-0.3.13 app/views/incline/users/_details.json.jbuilder
incline-0.3.12 app/views/incline/users/_details.json.jbuilder
incline-0.3.11 app/views/incline/users/_details.json.jbuilder
incline-0.3.10 app/views/incline/users/_details.json.jbuilder
incline-0.3.9 app/views/incline/users/_details.json.jbuilder
incline-0.3.8 app/views/incline/users/_details.json.jbuilder
incline-0.3.7 app/views/incline/users/_details.json.jbuilder
incline-0.3.6 app/views/incline/users/_details.json.jbuilder
incline-0.3.5 app/views/incline/users/_details.json.jbuilder
incline-0.3.4 app/views/incline/users/_details.json.jbuilder
incline-0.3.3 app/views/incline/users/_details.json.jbuilder
incline-0.3.2 app/views/incline/users/_details.json.jbuilder
incline-0.3.1 app/views/incline/users/_details.json.jbuilder
incline-0.3.0 app/views/incline/users/_details.json.jbuilder
incline-0.2.36 app/views/incline/users/_details.json.jbuilder
incline-0.2.35 app/views/incline/users/_details.json.jbuilder
incline-0.2.34 app/views/incline/users/_details.json.jbuilder
incline-0.2.28 app/views/incline/users/_details.json.jbuilder
incline-0.2.27 app/views/incline/users/_details.json.jbuilder