关联项目的提示信息
This commit is contained in:
parent
5cf88a287b
commit
dc0f004021
|
@ -104,14 +104,29 @@
|
|||
已关联项目:
|
||||
</div>
|
||||
<% activity.student_work_projects.where("is_leader = 1").each do |pro| %>
|
||||
<div class="mr10 mb10 fl">
|
||||
<% project = Project.find pro.project_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 =>"项目头像" %>
|
||||
<% project = Project.find pro.project_id %>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$("#project_img_<%=project.id %>").mouseover(function(){
|
||||
$("#relatePInfo_<%=project.id %>").css("display","block");
|
||||
}).mouseout(function(){
|
||||
$("#relatePInfo_<%=project.id %>").css("display","none");
|
||||
})
|
||||
});
|
||||
</script>
|
||||
<div class="mr20 mb10 fl">
|
||||
<% 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),:id=>"project_img_"+project.id.to_s,:alt =>"项目头像" %>
|
||||
<% 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",:id=>"project_img_"+project.id.to_s,:alt =>"项目头像") %>
|
||||
<% end %>
|
||||
<p class="c_red tac" title="综合评分"><%=project.project_score.score.to_i %></p>
|
||||
<div class="relatePInfo" id="relatePInfo_<%=project.id %>">
|
||||
项目名称:<%=project.name %><br />
|
||||
创建者:<%=(User.find project.user_id).show_name %><br />
|
||||
<% time=project.updated_on %>
|
||||
<% time=ForgeActivity.where("project_id=?",project.id).last.updated_at if ForgeActivity.where("project_id=?",project.id).last %>
|
||||
更新时间:<%=time_from_now time %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -102,18 +102,32 @@
|
|||
<% if homework_common.homework_type == 3 && !homework_common.student_work_projects.empty? && homework_common.homework_detail_group.base_on_project == 1 %>
|
||||
<div class="mt10">
|
||||
<div class="fl mr5 fontGrey3">
|
||||
<!--<img src="/images/course/proRelated.png" width="25" height="25" class="borderRadius mt7 ml7" title="已关联项目" />-->
|
||||
已关联项目:
|
||||
</div>
|
||||
<% homework_common.student_work_projects.where("is_leader = 1").each do |pro| %>
|
||||
<div class="mr10 mb10 fl">
|
||||
<% project = Project.find pro.project_id %>
|
||||
<% project = Project.find pro.project_id %>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$("#project_img_<%=project.id %>").mouseover(function(){
|
||||
$("#relatePInfo_<%=project.id %>").css("display","block");
|
||||
}).mouseout(function(){
|
||||
$("#relatePInfo_<%=project.id %>").css("display","none");
|
||||
})
|
||||
});
|
||||
</script>
|
||||
<div class="mr20 mb10 fl">
|
||||
<% 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),:id=>"project_img_"+project.id.to_s,:alt =>"项目头像" %>
|
||||
<% 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",:id=>"project_img_"+project.id.to_s,:alt =>"项目头像") %>
|
||||
<% end %>
|
||||
<p class="c_red tac" title="综合评分"><%=project.project_score.score.to_i %></p>
|
||||
<div class="relatePInfo" id="relatePInfo_<%=project.id %>">
|
||||
项目名称:<%=project.name %><br />
|
||||
创建者:<%=(User.find project.user_id).show_name %><br />
|
||||
<% time=project.updated_on %>
|
||||
<% time=ForgeActivity.where("project_id=?",project.id).last.updated_at if ForgeActivity.where("project_id=?",project.id).last %>
|
||||
更新时间:<%=time_from_now time %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -1209,6 +1209,7 @@ a:hover.blueCir{ background:#3598db; color:#fff;}
|
|||
.proHelp {background:url(/images/course/hwork_icon.png) -5px -124px no-repeat; display:inline-block; width:15px; height:15px; display:inline-block;}
|
||||
.hworkPrName {width:110px; max-width:110px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:18px; line-height:18px; font-size:12px; color:#888888; text-align:center;}
|
||||
.mr150 {margin-right:150px;}
|
||||
.relatePInfo {position:absolute; background-color:#ffffff; padding:3px 8px; white-space:nowrap; box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5); z-index:999; color:#585858; cursor:pointer; display:none;}
|
||||
|
||||
/*上传资源弹窗*/
|
||||
.resourceUploadPopup {width:400px; height:auto; border:3px solid #269ac9 !important; padding-left:16px; padding-bottom:16px; background-color:#ffffff; position:absolute; top:50%; left:50%; margin-left:-200px; z-index:1000;}
|
||||
|
|
|
@ -1381,3 +1381,5 @@ a:hover.blueCir{ background:#3598db; color:#fff;}
|
|||
.proHelp {background:url(/images/course/hwork_icon.png) -5px -124px no-repeat; display:inline-block; width:15px; height:15px; display:inline-block;}
|
||||
.hworkPrName {width:110px; max-width:110px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:18px; line-height:18px; font-size:12px; color:#888888; text-align:center;}
|
||||
.mr150 {margin-right:150px;}
|
||||
.relatePInfo {position:absolute; background-color:#ffffff; padding:3px 8px; white-space:nowrap; box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5); z-index:999; color:#585858; cursor:pointer; display:none;}
|
||||
|
||||
|
|
Loading…
Reference in New Issue