forked from openSUSE/open-build-service
/
_tabs.html.erb
41 lines (39 loc) · 1.48 KB
/
_tabs.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<% content_for :ready_function do %>
$("#advanced_tabs_trigger").click(function() {
$("#advanced_tabs").show();
$("#advanced_list_item").hide();
});
<% end %>
<% content_for :content_for_head do %>
<%= stylesheet_link_tag "package", :media => "all" %>
<% end %>
<div class="box-header header-tabs">
<ul id="package_tabs">
<% if @package.name == "patchinfo" %>
<%= tab 'Details', :controller => 'patchinfo', :action => 'show' %>
<% end %>
<%= tab 'Overview', :controller => 'package', :action => 'show' %>
<%= tab 'Sources', :controller => 'package', :action => 'files' %>
<% unless @spider_bot -%>
<%= tab 'Repositories', :controller => 'package', :action => 'repositories' %>
<%= tab 'Revisions', :controller => 'package', :action => 'revisions' %>
<%= tab "Requests", :controller => 'package', :action => 'requests' %>
<%= tab 'Users', :controller => 'package', :action => 'users' %>
<% end -%>
<% if @controller.is_advanced_tab? %>
<% content_for :ready_function do %>
$("#advanced_tabs").show();
<% end %>
<% else %>
<li id="advanced_list_item"><a href="#" id="advanced_tabs_trigger">Advanced</a></li>
<% end %>
</ul>
<% unless @spider_bot -%>
<div id="advanced_tabs" class="hidden">
<ul>
<%= tab 'Attributes', :controller => 'package', :action => 'attributes' %>
<%= tab 'Meta', :controller => 'package', :action => 'meta' %>
</ul>
</div>
<% end -%>
</div>