Move all tab to front
This commit is contained in:
parent
587a0bdb7b
commit
f5b97d9b5d
1 changed files with 6 additions and 6 deletions
|
@ -4,23 +4,23 @@
|
||||||
<div role="tabpanel">
|
<div role="tabpanel">
|
||||||
<!-- Nav tabs -->
|
<!-- Nav tabs -->
|
||||||
<ul class="nav nav-tabs" role="tablist">
|
<ul class="nav nav-tabs" role="tablist">
|
||||||
|
<li role="presentation" class="active"><a href="#all" role="tab" data-toggle="tab">All</a></li>
|
||||||
<% @categories.each do |o, i| %>
|
<% @categories.each do |o, i| %>
|
||||||
<li role="presentation"<% if i.zero? %> class="active"<% end %>><a href="#<%= o %>" aria-controls="<%= o %>" role="tab" data-toggle="tab"><%= o.titleize %></a></li>
|
<li role="presentation"><a href="#<%= o %>" aria-controls="<%= o %>" role="tab" data-toggle="tab"><%= o.titleize %></a></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<li role="presentation"><a href="#all" role="tab" data-toggle="tab">All</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<!-- Tab panes -->
|
<!-- Tab panes -->
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
<br />
|
<br />
|
||||||
|
<div role="tabpanel" class="tab-pane active" id="all">
|
||||||
|
<%= render @products %>
|
||||||
|
</div>
|
||||||
<% @categories.each do |o, i| %>
|
<% @categories.each do |o, i| %>
|
||||||
<div role="tabpanel" class="tab-pane<% if i.zero? %> active<% end %>" id="<%= o %>">
|
<div role="tabpanel" class="tab-pane" id="<%= o %>">
|
||||||
<%= render @products.where(category: i) %>
|
<%= render @products.where(category: i) %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div role="tabpanel" class="tab-pane" id="all">
|
|
||||||
<%= render @products %>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue