tap/app/views/products/_index.html.haml
2016-02-04 19:03:02 +01:00

16 lines
564 B
Text

.expand{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)