From dc0f004021426fafd8b5c8864f8fe4289269abaf Mon Sep 17 00:00:00 2001 From: cxt Date: Wed, 16 Dec 2015 15:47:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E8=81=94=E9=A1=B9=E7=9B=AE=E7=9A=84?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_course_homework.html.erb | 27 ++++++++++++++----- .../users/_user_homework_detail.html.erb | 26 +++++++++++++----- public/stylesheets/courses.css | 1 + public/stylesheets/new_user.css | 2 ++ 4 files changed, 44 insertions(+), 12 deletions(-) diff --git a/app/views/users/_course_homework.html.erb b/app/views/users/_course_homework.html.erb index a3aa5d5b1..fe02d9882 100644 --- a/app/views/users/_course_homework.html.erb +++ b/app/views/users/_course_homework.html.erb @@ -104,14 +104,29 @@ 已关联项目: <% activity.student_work_projects.where("is_leader = 1").each do |pro| %> -
- <% 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 %> + +
+ <% 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 %> -

<%=project.project_score.score.to_i %>

+
+ 项目名称:<%=project.name %>
+ 创建者:<%=(User.find project.user_id).show_name %>
+ <% 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 %> +
<% end %>
diff --git a/app/views/users/_user_homework_detail.html.erb b/app/views/users/_user_homework_detail.html.erb index 4217cf1a9..536a9deb6 100644 --- a/app/views/users/_user_homework_detail.html.erb +++ b/app/views/users/_user_homework_detail.html.erb @@ -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 %>
- 已关联项目:
<% homework_common.student_work_projects.where("is_leader = 1").each do |pro| %> -
- <% project = Project.find pro.project_id %> + <% 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 =>"项目头像" %> + <%= 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 %> -

<%=project.project_score.score.to_i %>

+
+ 项目名称:<%=project.name %>
+ 创建者:<%=(User.find project.user_id).show_name %>
+ <% 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 %> +
<% end %>
diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index 77c839f8d..6a6c3a7e7 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -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;} diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 0ed4df627..5a98211ab 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -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;} +