2015-04-09 19:18:04 +08:00
|
|
|
<% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %>
|
|
|
|
<div class="subNav">
|
|
|
|
<%= link_to l(:label_activity), {:controller => 'projects', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
|
|
|
|
<% unless ForgeActivity.where("project_id = ?", @project.id).count == 0 %>
|
|
|
|
<a class="subnav_num">(<%= ForgeActivity.where("project_id = ?", @project.id).count %>)</a>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
|
|
|
|
<div class="subNav">
|
|
|
|
<%= link_to l(:label_issue_tracking), project_issues_path(@project), :class => "f14 c_blue02" %>
|
|
|
|
<% unless @project.issues.count == 0 %>
|
|
|
|
<a class="subnav_num">(<%= @project.issues.count %>)</a>
|
|
|
|
<% end %>
|
|
|
|
<% if User.current.member_of?(@project) %>
|
|
|
|
<%= link_to "+"+l(:label_release_issue), new_project_issue_path(@project) , :class => "subnav_green" %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% unless @project.enabled_modules.where("name = 'boards'").empty? %>
|
|
|
|
<div class="subNav">
|
|
|
|
<%= link_to l(:project_module_boards), project_boards_path(@project), :class => "f14 c_blue02" %>
|
|
|
|
<% unless @project.boards.first.topics.count == 0 %>
|
|
|
|
<a class="subnav_num">(<%= @project.boards.first.topics.count %>)</a>
|
|
|
|
<% end %>
|
|
|
|
<% if User.current.member_of?(@project) %>
|
2015-04-29 14:29:03 +08:00
|
|
|
<%= link_to "+"+l(:project_module_boards_post), new_board_message_path(@project.boards.first), :layout => 'base_projects', :class => "subnav_green ml105" %>
|
2015-04-09 19:18:04 +08:00
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<% end%>
|
|
|
|
<% unless @project.enabled_modules.where("name = 'files'").empty? %>
|
|
|
|
<div class="subNav">
|
|
|
|
<%= link_to l(:project_module_files), project_files_path(@project), :class => "f14 c_blue02" %>
|
|
|
|
<% unless attaments_num == 0 %>
|
|
|
|
<a class="subnav_num">(<%= attaments_num %>)</a>
|
|
|
|
<% end %>
|
|
|
|
<% if User.current.member_of?(@project) %>
|
|
|
|
<%= link_to "+"+l(:label_upload_files), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<% end%>
|
|
|
|
<% unless @project.enabled_modules.where("name = 'repository'").empty? || @project.repositories.count == 0 %>
|
|
|
|
<div class="subNav">
|
|
|
|
<%= link_to l(:project_module_repository), {:controller => 'repositories', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
|
|
|
|
<a class="subnav_num">(<%= @project.repositories.count %>)</a>
|
|
|
|
</div>
|
|
|
|
<% end %><!--meny end -->
|
|
|
|
|
|
|
|
<!-- more -->
|
2015-04-14 10:46:31 +08:00
|
|
|
<div class="subNav subNav_jiantou" onclick="expand_tools_expand();" id="expand_tools_expand"><%= l(:label_project_more) %></div>
|
2015-04-09 19:18:04 +08:00
|
|
|
<ul class="navContent">
|
|
|
|
<%= render 'projects/tools_expand' %>
|
2015-04-16 09:30:06 +08:00
|
|
|
</ul>
|