<% projects.each do |project|%> <% allow_visit = project.status != 9 && (project.is_public || User.current.member_of?(project) || User.current.admin? || User.current.admin_of_contest?(@contestwork.contest) || User.current.judge_of_contest?(@contestwork.contest)) %>
<% projectUser = User.where("id=?",project.user_id).first %> <% is_change = project.status == 9 && projectUser == User.current && @contestwork.contestant_works.has_committed.where("user_id = #{User.current.id}").count == 1 %>

<% if allow_visit %> <%= link_to "#{project.name}", project_path(project.id,:host=>Setting.host_name), :target => '_blank', :class => "new_project_title fl",:id => "show_project_#{project.id}", :title => (project.is_public? ? "公开项目:":"私有项目:") + project.name%> <% elsif project.status != 9 %> <%=project.name %> <% else %> <%=project.name %> <% end %>

<%= project.is_public? ? '公开' : '私有' %> <%# if is_change %> <%# end %> <%=link_to "".html_safe, user_path(projectUser), :title => "#{projectUser.show_name}" %>

更新时间:<%= format_date(project.updated_on) %>

<%= link_to project.members.count, allow_visit ? member_project_path(project) : 'javascript:void(0)', :class => "c_blue" %>成员  | <%= link_to project.project_score.issue_num, allow_visit ? project_issues_path(project) : 'javascript:void(0)', :class => "c_blue" %>问题  | <%= link_to project.project_score.changeset_num, visible_repository?(project) ? ({:controller => 'repositories', :action => 'show', :id => project, :repository_id => gitlab_repository(project).try(:identifier)}) : 'javascript:void(0)', :class => "c_blue" %>提交

<% end %>