mirror of
				https://github.com/fspc/BikeShed-1.git
				synced 2025-10-31 08:55:36 -04:00 
			
		
		
		
	Set default sort order on users, bikes, userroles
This commit is contained in:
		
							parent
							
								
									3599cc2bbb
								
							
						
					
					
						commit
						e491c0530c
					
				| @ -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 | ||||
|  | ||||
| @ -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| | ||||
|  | ||||
| @ -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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user