mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-05 22:26:07 +00:00
toggle: tabs show on first click and hide on second click select: tabs show on every click, one tab is always active
17 lines
625 B
Plaintext
17 lines
625 B
Plaintext
#tabs{"ng-controller" => "TabsCtrl"}
|
|
.row
|
|
%tabset
|
|
-# Build all tabs.
|
|
- for name, heading_cols in { about: ["About #{current_distributor.name}", 4],
|
|
producers: ["Producers",3],
|
|
groups: ["Groups",2],
|
|
contact: ["Contact",3]}
|
|
-# tabs take tab path in 'active' and 'select' functions defined in TabsCtrl.
|
|
- heading, cols = heading_cols
|
|
%tab.columns{heading: heading,
|
|
id: "tab_#{name}",
|
|
active: "active(\'#{name}\')",
|
|
select: "toggle(\'#{name}\')",
|
|
class: "small-12 medium-#{cols}" }
|
|
= render "shopping_shared/#{name}"
|