1 <% content_for :tab_panes do %>
3 <% comparable = controller.respond_to? :compare %>
4 <% pane_list ||= %w(recent) %>
5 <% panes = Hash[pane_list.map { |pane|
6 [pane, render(partial: 'show_' + pane.downcase,
7 locals: { comparable: comparable })]
10 <ul class="nav nav-tabs">
11 <% panes.each_with_index do |(pane, content), i| %>
12 <li class="<%= 'active' if i==0 %>"><a href="#<%= pane %>" data-toggle="tab" id="<%= pane %>-tab"> <%= pane.gsub('_', ' ') %></a></li>
15 <div class="tab-content">
16 <% panes.each_with_index do |(pane, content), i| %>
17 <div id="<%= pane %>" class="tab-pane fade <%= 'in active' if i==0 %>">
18 <div class="smart-scroll" style="margin-top:0.5em;">
27 <% content_for :js do %>
28 $(window).on('load', smart_scroll_fixup);
29 $(document).on('shown.bs.tab', 'ul.nav-tabs > li > a', smart_scroll_fixup);