app/views/layouts/_sections.html.erb
<div class="tabbable">
<ul class="nav nav-tabs sections">
<%- sections.select { |s| data[s] }.each_with_index do |section_key, index| -%>
<li id="tab-<%= section_key %>" class="nav-item">
<a href="#<%= section_key %>" class="nav-link<%= " active" if index == 0 %>" data-toggle="tab"><%= t("txt.views.layouts.sections.#{section_key}", :default => section_key.humanize) %></a>
</li>
<%- end -%>
</ul>
<div class="tab-panels">
<%- sections.select { |s| data[s] }.each_with_index do |section_key, index| -%>
<div class="tab-pane <%= "active" if index == 0 %>" id="<%= section_key %>">
<%- data[section_key].keys.sort.each do |sort_key| -%>
<%= raw data[section_key][sort_key] %>
<%- end -%>
</div>
<%- end -%>
</div>
</div>