mirror of
				https://github.com/fspc/BikeShed-1.git
				synced 2025-10-31 08:55:36 -04:00 
			
		
		
		
	Moved brands/models tab to the lower pane of bikes
This commit is contained in:
		
							parent
							
								
									5e042c2577
								
							
						
					
					
						commit
						9300ef83d1
					
				| @ -19,11 +19,7 @@ class AppTabPanel < Netzke::Basepack::TabPanel | ||||
| 
 | ||||
|     #all users | ||||
|     #  (had to use hash for borders to get the title to display properly) | ||||
|     @@app_tab_panel_items = [ :bikes_border, | ||||
|                               { layout: :fit, | ||||
|                                 wrappedComponent: :brands_and_models_border, | ||||
|                                 title: "Brands/Models"} | ||||
|                               ] | ||||
|     @@app_tab_panel_items = [ :bikes_border ] | ||||
| 
 | ||||
|     #for users only | ||||
|     if not controller.current_user.role?(:admin) | ||||
|  | ||||
| @ -1,10 +0,0 @@ | ||||
| class BikeLogsAndTasksAccordian < Netzke::Basepack::Accordion | ||||
|   component :bike_logs | ||||
|   component :tasks | ||||
| 
 | ||||
|   def configure(c) | ||||
|     c.prevent_header = true | ||||
|     c.items = [ :bike_logs, :tasks ] | ||||
|     super | ||||
|   end | ||||
| end | ||||
							
								
								
									
										12
									
								
								app/components/bike_lower_tabs.rb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								app/components/bike_lower_tabs.rb
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,12 @@ | ||||
| class BikeLowerTabs < Netzke::Basepack::TabPanel | ||||
|   component :bike_logs | ||||
|   component :tasks | ||||
|   component :brands_and_models_border | ||||
| 
 | ||||
|   def configure(c) | ||||
|     c.prevent_header = true | ||||
|     c.items = [ :bike_logs, :tasks, | ||||
|                 {netzke_component: :brands_and_models_border, title: "Brands and Models"} ] | ||||
|     super | ||||
|   end | ||||
| end | ||||
| @ -2,7 +2,7 @@ class BikesBorder < Netzke::Base | ||||
|   # Remember regions collapse state and size | ||||
|   include Netzke::Basepack::ItemPersistence | ||||
|   component :bikes | ||||
|   component :bike_logs_and_tasks_accordian | ||||
|   component :bike_lower_tabs | ||||
| 
 | ||||
|   def configure(c) | ||||
|     super | ||||
| @ -10,7 +10,7 @@ class BikesBorder < Netzke::Base | ||||
|     c.title = "Bikes" | ||||
|     c.items = [ | ||||
|      { netzke_component: :bikes, region: :center, split: true }, | ||||
|      { netzke_component: :bike_logs_and_tasks_accordian, region: :south, height: 300, split: true} | ||||
|      { netzke_component: :bike_lower_tabs, region: :south, height: 300, split: true} | ||||
|     ] | ||||
|   end | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user