-
Notifications
You must be signed in to change notification settings - Fork 437
/
_tabs.html.erb
45 lines (43 loc) · 2.34 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
42
43
44
45
<%= content_for :ready_function do %>
$("#advanced_tabs_trigger").click(function() {
$("#advanced_tabs").show();
$("#advanced_list_item").hide();
});
<% end %>
<div class="box-header header-tabs" id="project_tabs">
<ul>
<%= tab 'overview', 'Overview', controller: '/webui/project', action: :show %>
<% if @is_maintenance_project && !@spider_bot %>
<%= tab 'incidents', 'Incidents', controller: '/webui/project', action: :maintenance_incidents %>
<%= tab 'maintained', 'Maintained Projects', controller: '/webui/project', action: :maintained_projects %>
<% else %> <!-- also for incident project -->
<%= tab 'repositories', "Repositories", controller: '/webui/repositories', action: :index unless @project.defines_remote_instance? || @spider_bot %>
<% end %>
<% if @project.repositories.any? && !@spider_bot -%>
<%= tab 'monitor', "Monitor", controller: '/webui/project', action: :monitor %>
<% end -%>
<% unless @spider_bot -%>
<%= tab 'requests', "Requests", controller: '/webui/project', action: 'requests' %>
<%= tab 'users', 'Users', controller: '/webui/project', action: :users unless @project.defines_remote_instance? %>
<%= tab 'subprojects', 'Subprojects', controller: '/webui/project', action: :subprojects unless @project.defines_remote_instance? || @is_maintenance_project %>
<% end -%>
<% if 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>
<div id="advanced_tabs" class="hidden">
<ul>
<%= tab 'projectconfig', 'Project Config', controller: '/webui/projects/project_configuration', action: :show unless @project.defines_remote_instance? || @is_maintenance_project %>
<% unless @spider_bot -%>
<%= tab 'attribute', 'Attributes', controller: '/webui/attribute', project: @project, action: 'index' %>
<%= tab 'meta', "Meta", controller: '/webui/projects/meta', action: :show %>
<%= tab 'status', 'Status', controller: '/webui/project', action: :status unless @project.defines_remote_instance? || @is_maintenance_project %>
<%= tab 'pulse', 'Pulse', controller: '/webui/projects/pulse', action: :show %>
<% end -%>
</ul>
</div>
</div>