tap/app/views/products/_index.html.haml

17 lines
564 B
Text
Raw Normal View History

2016-02-04 19:03:02 +01:00
.expand{role: "tabpanel"}
2015-09-17 14:05:33 +02:00
/ 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)