X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/96fe9fc822c2270cb6e4212798d61e61481ec2e0..5ea2ee645b5508c9c14cc2abe6cb8c2f24039c83:/apps/workbench/app/views/application/_content.html.erb diff --git a/apps/workbench/app/views/application/_content.html.erb b/apps/workbench/app/views/application/_content.html.erb index c9522de3f2..1f7f2d29c5 100644 --- a/apps/workbench/app/views/application/_content.html.erb +++ b/apps/workbench/app/views/application/_content.html.erb @@ -1,96 +1,68 @@ -<% content_for :content_top do %> - <% if @object and not @object.is_a?(Group) and @object.class.goes_in_projects? and @object.owner_uuid == current_user.uuid and not @name_link %> -
-
- - Hey. This <%= @object.class_for_display.downcase %> belongs to your account, but it's not in any of your projects. If you want it to be easy to find in the future, you should move it to a project.
- <%= button_to(choose_projects_path( - title: 'Move to...', - editable: true, - action_name: 'Move', - action_href: url_for(action: :update), - action_method: 'patch', - action_data: {selection_param: @object.resource_param_name+'[owner_uuid]', success: 'page-refresh'}.to_json), - { class: "btn btn-primary btn-sm", remote: true, method: 'get' }) do %> - Choose a project... - <% end %> -
-
- <% end %> -<% end %> +<% content_for :tab_panes do %> -<% content_for :js do %> - tab_pane_valid_state = {}; + <% comparable = controller.respond_to? :compare %> - function ajaxRefreshTabPane(pane) { - if (!tab_pane_valid_state[pane]) { - tab_pane_valid_state[pane] = true; - $.ajax('<%=j url_for() %>?<%= raw(controller.request.query_string) %>&tab_pane='+pane, {dataType: 'html', type: 'GET'}). - done(function(data, status, jqxhr) { - $('#' + pane + ' > div > div').html(data); - ajaxRefreshTabPane(pane); - }); - } - } + - -
-<% pane_list.each_with_index do |pane, i| %> -
- data-object-kind="arvados#<%= ArvadosApiClient.class_kind controller.model_class %>" -<% else %> - data-object-uuid="<%= @object.uuid %>" -<% end %> - > - -<% content_for :js do %> - <% if i == 0 %> - tab_pane_valid_state['<%=j pane %>'] = true; - <% else %> - tab_pane_valid_state['<%=j pane %>'] = false; - $(document).on('ready', function() { - ajaxRefreshTabPane('<%=j pane %>'); - }); - <% end %> -<% end %> - -
-
- <% if i == 0 %> - <%= render(partial: 'show_' + pane.downcase, - locals: { comparable: comparable, objects: @objects }) %> +
+ <% pane_list.each_with_index do |pane, i| %> + <% pane_name = (pane.is_a?(Hash) ? pane[:name] : pane) %> +
+ data-object-kind="arvados#<%= ArvadosApiClient.class_kind controller.model_class %>" + <% else %> + data-object-uuid="<%= @object.uuid %>" + <% end %> + data-pane-content-url="<%= url_for(params.merge(tab_pane: pane_name)) %>" + style="margin-top:0.5em;" + > +
+ <% if i == 0 %> + <%= render_pane pane_name, to_string: true %> <% else %>
- <% end %> + <% end %> +
-
+ <% end %>
-<% end %> -
<% end %>