作品列表的私有项目不可点击
This commit is contained in:
parent
c199de1d36
commit
eb8e9f32a3
|
@ -46,7 +46,12 @@
|
||||||
<% if @homework.homework_detail_group.base_on_project == 1 %>
|
<% if @homework.homework_detail_group.base_on_project == 1 %>
|
||||||
<li>
|
<li>
|
||||||
<span class="tit_fb"> 关联项目:</span>
|
<span class="tit_fb"> 关联项目:</span>
|
||||||
|
<% if work.project.is_public || User.current.member_of?(work.project) || User.current.admin? %>
|
||||||
<%= link_to( work.project.name, project_path(work.project.id), :class => "linkBlue" )%>
|
<%= link_to( work.project.name, project_path(work.project.id), :class => "linkBlue" )%>
|
||||||
|
<% else %>
|
||||||
|
<span title ="该项目是私有的"><%=work.project.name %></span>
|
||||||
|
<% end %>
|
||||||
|
<%#= link_to( work.project.name, project_path(work.project.id), :class => "linkBlue" )%>
|
||||||
<span class="ml5">(综合评分:<font class="c_red"><%=work.project.project_score.score.to_i %></font>)</span>
|
<span class="ml5">(综合评分:<font class="c_red"><%=work.project.project_score.score.to_i %></font>)</span>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -105,8 +105,8 @@
|
||||||
</div>
|
</div>
|
||||||
<% activity.student_work_projects.where("is_leader = 1").each do |pro| %>
|
<% activity.student_work_projects.where("is_leader = 1").each do |pro| %>
|
||||||
<div class="mr10 mb10 fl">
|
<div class="mr10 mb10 fl">
|
||||||
<% project = Project.find pro.project_id || User.current.member_of?(project) || User.current.admin? %>
|
<% project = Project.find pro.project_id %>
|
||||||
<% if project.is_public || project.user_id == User.current.id %>
|
<% if project.is_public || User.current.member_of?(project) || User.current.admin?%>
|
||||||
<%= link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius"),project_path(project.id,:host=>Setting.host_name),:alt =>"项目头像" %>
|
<%= link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius"),project_path(project.id,:host=>Setting.host_name),:alt =>"项目头像" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius") %>
|
<%= image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius") %>
|
||||||
|
|
|
@ -108,8 +108,8 @@
|
||||||
<% homework_common.student_work_projects.where("is_leader = 1").each do |pro| %>
|
<% homework_common.student_work_projects.where("is_leader = 1").each do |pro| %>
|
||||||
<div class="mr10 mb10 fl">
|
<div class="mr10 mb10 fl">
|
||||||
<% project = Project.find pro.project_id %>
|
<% project = Project.find pro.project_id %>
|
||||||
<% if project.is_public == 1 || User.current.member_of?(project) || User.current.admin? %>
|
<% if project.is_public || User.current.member_of?(project) || User.current.admin? %>
|
||||||
<%=link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius"),project_path(project.id,:host=>Setting.host_name) %>
|
<%= link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius"),project_path(project.id,:host=>Setting.host_name),:alt =>"项目头像" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius") %>
|
<%= image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius") %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
Loading…
Reference in New Issue