<% projects.each do |project|%> <% allow_visit = project.status != 9 && (project.is_public || User.current.member_of?(project) || User.current.admin? || User.current.allowed_to?(:as_teacher, @homework.course)) %>

<% 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? ? '公开' : '私有' %> <% projectUser = User.where("id=?",project.user_id).first %> <%=link_to "创建者:#{projectUser.try(:realname) != " " ? projectUser.lastname + projectUser.firstname : projectUser.try(:login)}".html_safe, user_path(projectUser) %>

更新时间:<%= 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 %>