Browse Source

Set default sort order on users, bikes, userroles

eperez-timeinput
Jason Denney 11 years ago
parent
commit
e491c0530c
  1. 1
      app/components/bikes.rb
  2. 1
      app/components/user_role_joins.rb
  3. 1
      app/components/users.rb

1
app/components/bikes.rb

@ -2,6 +2,7 @@ class Bikes < Netzke::Basepack::Grid
def configure(c)
super
c.model = "Bike"
c.data_store.sorters = [{ :property => :shop_id, :direction => :ASC}]
# columns with :id set, have :min_chars set in init_component
# See: http://stackoverflow.com/questions/17738962/netzke-grid-filtering

1
app/components/user_role_joins.rb

@ -4,6 +4,7 @@ class UserRoleJoins < Netzke::Basepack::Grid
c.model = "UserRoleJoin"
c.header = false
c.title = "User Roles"
c.data_store.sorters = [{ :property => :user__username, :direction => :ASC}]
c.columns = [
{ :name => :user__username, :text => "Username", :read_only => true},
{ :name => :name, :getter => lambda{ |rec|

1
app/components/users.rb

@ -13,6 +13,7 @@ class Users < Netzke::Basepack::Grid
c.header = false
c.model = "User"
c.data_store.sorters = [{ :property => :username, :direction => :ASC}]
c.columns = [
{ :name => :username, :read_only => true },
:first_name,

Loading…
Cancel
Save