projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Have a new view showing users at /users/storage. No storage info yet, but it's a...
[arvados.git]
/
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 37250cc0299efa0a63aa63688aacf4c7e98d3bfe..53444a5c9c72defe283deff498996f1c8ffb7782 100644
(file)
--- a/
apps/workbench/app/views/application/_content.html.erb
+++ b/
apps/workbench/app/views/application/_content.html.erb
@@
-1,17
+1,22
@@
<% content_for :tab_panes do %>
<% content_for :tab_panes do %>
+<% comparable = controller.respond_to? :compare %>
<% pane_list ||= %w(recent) %>
<% pane_list ||= %w(recent) %>
+<% panes = Hash[pane_list.map { |pane|
+ [pane, render(partial: 'show_' + pane.downcase,
+ locals: { comparable: comparable })]
+ }.compact] %>
<ul class="nav nav-tabs">
<ul class="nav nav-tabs">
- <% pane
_list.each_with_index do |pane
, i| %>
- <li class="<%= 'active' if i==0 %>"><a href="#<%= pane %>" data-toggle="tab" id="<%= pane %>-tab"> <%= pane.
capitalize.
gsub('_', ' ') %></a></li>
+ <% pane
s.each_with_index do |(pane, content)
, i| %>
+ <li class="<%= 'active' if i==0 %>"><a href="#<%= pane %>" data-toggle="tab" id="<%= pane %>-tab"> <%= pane.gsub('_', ' ') %></a></li>
<% end %>
</ul>
<div class="tab-content">
<% end %>
</ul>
<div class="tab-content">
-<% pane
_list.each_with_index do |pane
, i| %>
+<% pane
s.each_with_index do |(pane, content)
, i| %>
<div id="<%= pane %>" class="tab-pane fade <%= 'in active' if i==0 %>">
<div id="<%= pane %>" class="tab-pane fade <%= 'in active' if i==0 %>">
- <div class="smart-scroll">
- <%=
render partial: 'show_' + pane
%>
+ <div class="smart-scroll"
style="margin-top:0.5em;"
>
+ <%=
content
%>
</div>
</div>
<% end %>
</div>
</div>
<% end %>
@@
-19,3
+24,7
@@
<% end %>
<% end %>
+<% content_for :js do %>
+ $(window).on('load', smart_scroll_fixup);
+ $(document).on('shown.bs.tab', 'ul.nav-tabs > li > a', smart_scroll_fixup);
+<% end %>