1 <% content_for :content_top do %>
2 <% if @object and not @object.is_a?(Group) and @object.class.goes_in_folders? and @object.owner_uuid == current_user.uuid %>
3 <div class="pull-right" style="width: 40%">
4 <div class="alert alert-warning alert-dismissable">
5 <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
6 <strong>Hey.</strong> This <%= @object.class_for_display.downcase %> belongs to your account, but it's not in any of your folders. If you want it to be easy to find in the future, you should move it to a folder.<br />
7 <%= button_to(choose_folders_path(
11 action_href: url_for(action: :update),
12 action_method: 'patch',
13 action_data: {selection_param: @object.resource_param_name+'[owner_uuid]', success: 'page-refresh'}.to_json),
14 { class: "btn btn-primary btn-sm", remote: true, method: 'get' }) do %>
15 <i class="fa fa-fw fa-folder"></i> Choose a folder...
22 <% content_for :tab_panes do %>
24 <% comparable = controller.respond_to? :compare %>
25 <% pane_list ||= %w(recent) %>
26 <% panes = Hash[pane_list.map { |pane|
27 [pane, render(partial: 'show_' + pane.downcase,
28 locals: { comparable: comparable, objects: @objects })]
31 <ul class="nav nav-tabs">
32 <% panes.each_with_index do |(pane, content), i| %>
33 <li class="<%= 'active' if i==0 %>"><a href="#<%= pane %>" data-toggle="tab" id="<%= pane %>-tab"> <%= pane.gsub('_', ' ') %></a></li>
36 <div class="tab-content">
37 <% panes.each_with_index do |(pane, content), i| %>
38 <div id="<%= pane %>" class="tab-pane fade <%= 'in active' if i==0 %>">
39 <div id="<%= pane %>-scroll" class="<%= 'smart-scroll' if pane.match(/graph/) %>" style="margin-top:0.5em;">
48 <% content_for :js do %>
49 $(window).on('load', smart_scroll_fixup);
50 $(document).on('shown.bs.tab', 'ul.nav-tabs > li > a', smart_scroll_fixup);