From 8e3bc28fa246bc02388a791b843ae7b468d31465 Mon Sep 17 00:00:00 2001 From: yutao <283765470@qq.com> Date: Thu, 16 Jul 2015 13:43:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/users_helper.rb | 9 +++++++++ app/views/users/user_course_activities.html.erb | 14 ++++++++------ app/views/users/user_courses4show.html.erb | 4 +++- app/views/users/user_projects4show.html.erb | 4 +++- public/stylesheets/users.css | 6 +++--- 5 files changed, 26 insertions(+), 11 deletions(-) diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index 4318abcf8..ccdfd4d07 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -431,6 +431,15 @@ module UsersHelper # end # return false # end + def get_activity_act_showname_htmlclear(activity) + str = get_activity_act_showname(activity) + str = str.gsub(/<.*>/,'') + str = str.lstrip.rstrip + if str == '' + str = 'RE:' + end + return str.html_safe + end def get_activity_act_showname(activity) case activity.act_type when "HomeworkCommon" diff --git a/app/views/users/user_course_activities.html.erb b/app/views/users/user_course_activities.html.erb index 98de0ea11..7fc076da5 100644 --- a/app/views/users/user_course_activities.html.erb +++ b/app/views/users/user_course_activities.html.erb @@ -1,16 +1,18 @@ <% for rec in @list %>
- -
  • <%= rec[:e].name %>
  • + +
    + <%= rec[:e].name %> + <% if( rec[:e].is_public == false || rec[:e].is_public == 0 ) %> - 私有 - <% end %> - + 私有 + <% end %> + <%= rec[:item].user.show_name %> <%= get_activity_opt(rec[:item],rec[:e]) %> - <%= get_activity_act_showname(rec[:item]).html_safe %> + <%= get_activity_act_showname_htmlclear(rec[:item]) %> <%= time_tag(get_activity_act_createtime(rec[:item])).html_safe %>
    diff --git a/app/views/users/user_courses4show.html.erb b/app/views/users/user_courses4show.html.erb index a95c90f18..2746f10cd 100644 --- a/app/views/users/user_courses4show.html.erb +++ b/app/views/users/user_courses4show.html.erb @@ -4,7 +4,9 @@
    item.id, :host=>Setting.host_course) %>"><%= image_tag(url_to_avatar(item), :style => 'width:64px;height:64px;') %>
    - item.id, :host=>Setting.host_course) %>" class="home_list_title c_blue02 fl mb10" title="<%= item.name %>"><%= item.name %> + + item.id, :host=>Setting.host_course) %>" class="home_list_title c_blue02 fl mb10" title="<%= item.name %>"><%= item.name %> +

    主讲老师:<%= item.teacher.show_name %>

    课程作业:<%= item.homework_commons.count %> 成员:<%= item.members.count %>

    diff --git a/app/views/users/user_projects4show.html.erb b/app/views/users/user_projects4show.html.erb index d68089741..7435a1d14 100644 --- a/app/views/users/user_projects4show.html.erb +++ b/app/views/users/user_projects4show.html.erb @@ -3,7 +3,9 @@
    item.id, :host=>Setting.host_name) %>"><%= image_tag(url_to_avatar(item), :style => 'width:64px;height:64px;') %>
    - item.id, :host=>Setting.host_name) %>" class="home_list_title c_blue02 fl mb10" title="<%= item.name %>"><%= item.name %> + + item.id, :host=>Setting.host_name) %>" class="home_list_title c_blue02 fl mb10" title="<%= item.name %>"><%= item.name %> +

    项目评分:<%= format( "%.2f" , project_scores(item) ).to_i %>

    diff --git a/public/stylesheets/users.css b/public/stylesheets/users.css index 5e99060ee..ddfb02e18 100644 --- a/public/stylesheets/users.css +++ b/public/stylesheets/users.css @@ -34,10 +34,10 @@ a:hover.icon_face{background:url(../images/public_icon.png) -79px -671px no-repe /*课程动态*/ .line_box{ width:728px; border:1px solid #d9d9d9; padding-bottom:10px;} .users_courses_list{ height:24px; border-bottom:1px dashed #CCC; margin-bottom:10px;} -.users_coursename{width:180px; font-weight:bold; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; margin-right:5px; } +.users_coursename{max-width:135px; font-weight:bold; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; margin-right:5px; } .course_name{max-width:60px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} .c_grey{ color:#8d8d8d;} -.users_courses_txt{width:330px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} +.users_courses_txt{max-width:330px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} .users_top{ height:39px; border-bottom:1px solid #d9d9d9; margin-bottom:10px;} .users_h4{border-bottom:1px solid #d9d9d9; height:29px; padding:10px 0 0 10px; margin-bottom:10px; } /*弹框*/ @@ -106,7 +106,7 @@ a:hover.c_lgrey{ color:#3ca5c6;} .leftbox_ul_left li,.leftbox_ul_right li{ margin-bottom:5px;} .c_dgrey{ color:#696969;} .home_courses_list{ width:364px; margin-bottom:10px; } -.home_list_title{ width:260px; font-size:14px; font-weight:bold;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} +.home_list_title{ max-width:260px; font-size:14px; font-weight:bold;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} .users_list{ } .users_course_intro{ width:530px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}