bouquins-ror/app/views/authors/show.html.erb
2015-07-05 20:31:36 +02:00

22 lines
665 B
Plaintext

<div class="page-header">
<h1>
<span class="glyphicon glyphicon-user"></span> <%= @author.name %>
</h1>
</div>
<ul id="tabs" class="nav nav-tabs">
<% @tabs.each do |tab| %>
<li role="presentation" class="<%= tab[:active] ? "active" : "" %>">
<%= link_to({ controller: "authors", action: tab[:action], id: @author}, { data: { toggle: 'tab', target: tab[:action] }, remote: true }) do %>
<span class="glyphicon glyphicon-<%= tab[:icon] %>"></span> <%= tab[:label] %>
<% end %>
</li>
<% end %>
</ul>
<div id="tabcontent" class="tab-content">
<% @tabs.each do |tab|
if tab[:active] %>
<%= render(partial: "authors/#{ tab[:action]}") %>
<% end
end %>
</div>