1 <% content_for :tab_panes do %>
3 <% comparable = controller.respond_to? :compare %>
5 <ul class="nav nav-tabs">
6 <% pane_list.each_with_index do |pane, i| %>
7 <li class="<%= 'active' if i==0 %>"><a href="#<%= pane %>" data-toggle="tab" id="<%= pane %>-tab"> <%= pane.gsub('_', ' ') %></a></li>
10 <div class="tab-content">
11 <% pane_list.each_with_index do |pane, i| %>
13 class="tab-pane fade <%= 'in active' if i==0 %> arv-log-event-listener"
14 data-object-uuid="<%= @object.uuid if @object %>">
16 <% content_for :js do %>
17 $(document).on('<%= 'ready' if i != 0 %> arv-log-event', function() {
18 $.ajax('<%= url_for @object %>?tab_pane=<%= pane %>', {dataType: 'html', type: 'GET'}).
19 done(function(data, status, jqxhr) {
20 $('#<%= pane %> > div > div').html(data);
22 fail(function(jqxhr, status, error) {
27 <div class="smart-scroll" style="margin-top:0.5em;">
28 <div class="pane-content">
30 <%= render(partial: 'show_' + pane.downcase,
31 locals: { comparable: comparable, objects: @objects }) %>
33 <%= image_tag 'ajax-loader.gif' %>
43 <% content_for :js do %>
44 $(window).on('load', smart_scroll_fixup);
45 $(document).on('shown.bs.tab', 'ul.nav-tabs > li > a', smart_scroll_fixup);