tap/app/views/products/_index.html.haml
2015-09-17 14:05:33 +02:00

16 lines
561 B
Text

%div{role: "tabpanel"}
/ Nav tabs
%ul.nav.nav-tabs{role: "tablist"}
%li.active{role: "presentation"}
%a{"data-toggle" => "tab", href: "#all", role: "tab"} All
- @categories.each do |o, i|
%li{role: "presentation"}
%a{"aria-controls" => o, "data-toggle" => "tab", href: "##{o}", role: "tab"}= o.titleize
/ Tab panes
.tab-content
%br/
#all.tab-pane.active{role: "tabpanel"}
= render @products
- @categories.each do |o, i|
.tab-pane{id: o, role: "tabpanel"}
= render @products.where(category: i)