@ -1,21 +1,19 @@
<% project_file_num = Attachment.where(:container_type => "Project", :container_id => @project.id).count %>
<% project_issue_count = @project.issues.count %>
<% training_tasks_count = @project.training_tasks.count %>
<% project_acts = ForgeActivity.where("project_id = ?", @project.id).count %>
<% raodmaps = Version.where("project_id = ?", @project.id).count %>
<% project_score = @project.project_score %>
<%# 更新访问数,刷新的时候更新访问次数 %>
<% update_visiti_count(@project) if @project.try(:id) %>
<% update_visiti_count(@project) if @project.try(:id) %>
<div class="pro_new">
<div class="pro_new_top clear">
<div class="fl pro_new_name clear">
<% unless @project.is_public %><i class="fa fa-lock color-grey-c mr5 font-24 fl "></i><% end %>
<% if @project.is_training_project? %>
<%=link_to "#{@project.owner.try(:show_name)}导师<span class='ml5 mr5'>/</span>".html_safe, user_path(@project.owner), :class => "pro_new_username" %>
<%= link_to "#{@project.owner.try(:show_name)}导师<span class='ml5 mr5'>/</span>".html_safe, user_path(@project.owner), :class => "pro_new_username" %>
<% else %>
<%=link_to "#{@project.owner.try(:show_name)}<span class='ml5 mr5'>/</span>".html_safe, user_path(@project.owner), :class => "pro_new_username" %>
<%= link_to "#{@project.owner.try(:show_name)}<span class='ml5 mr5'>/</span>".html_safe, user_path(@project.owner), :class => "pro_new_username" %>
<% end %>
<%=link_to @project.name, project_path(@project), :class => "pro_new_username break_word" %>
<%= link_to @project.name, project_path(@project), :class => "pro_new_username break_word" %>
</div>
<!--加入、退出、关注项目-->
@ -52,14 +50,6 @@
<%= link_to project_issue_count > 0 ? "#{l(:label_issue_tracking)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k project_issue_count}</span>".html_safe : "#{l(:label_issue_tracking)}", project_issues_path(@project, :remote => true), :class => "pro_new_proname" %>
</li>
<% end %>
<!--实训任务-->
<% if !@project.enabled_modules.where("name = 'training_tasks'").empty? %>
<% if User.current.admin? || is_project_manager?(User.current.id, @project.id) || is_project_manager?(User.current, @project.try(:forked_from_project_id)) %>
<li id="project_menu_011">
<%= link_to training_tasks_count > 0 ? "#{l(:project_module_training_tasks)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k training_tasks_count}</span>".html_safe : "#{l(:project_module_training_tasks)}", project_training_tasks_url(@project), :class => "pro_new_proname" %>
</li>
<% end %>
<% end %>
<!--资源库-->
<% unless @project.enabled_modules.where("name = 'files'").empty? %>