Files
openfoodnetwork/app/views/shopping_shared/_tabs.html.haml
Maikel Linke 9798b05a24 TabsCtrl can show tabs that don't toggle
toggle: tabs show on first click and hide on second click
select: tabs show on every click, one tab is always active
2015-01-06 22:39:15 +11:00

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}"