From f90b25b23044091eb60aefefcd309589f715faaa Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 22 Mar 2016 15:50:06 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E9=99=84=E4=BB=B6?= =?UTF-8?q?=E7=9A=84=E7=94=A8=E6=88=B7=E5=90=8D=E7=9C=81=E7=95=A5=E5=8F=B7?= =?UTF-8?q?=E5=A4=AA=E6=97=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/attachments/_activity_attach.html.erb | 4 ++-- public/stylesheets/courses.css | 1 + public/stylesheets/new_user.css | 1 + public/stylesheets/public.css | 3 ++- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/views/attachments/_activity_attach.html.erb b/app/views/attachments/_activity_attach.html.erb index 32e796382..3cc429185 100644 --- a/app/views/attachments/_activity_attach.html.erb +++ b/app/views/attachments/_activity_attach.html.erb @@ -3,14 +3,14 @@
- <%= link_to_short_attachment attachment,:length=> 58, :class => 'hidden link_file_a fl newsBlue mw400', :download => true -%> + <%= link_to_short_attachment attachment,:length=> 58, :class => 'hidden link_file_a fl newsBlue mw380', :download => true -%> ( <%= number_to_human_size attachment.filesize %>) - <%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author),:class => "c_orange" %>, + <%= link_to h(truncate(attachment.author.name, length: 15, omission: '...')),user_path(attachment.author),:class => "c_orange" %>, <%= format_time(attachment.created_on) %>
diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index 7dd3fd74f..b4d07f64f 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -419,6 +419,7 @@ a:hover.ping_sub{ background:#14a8b9;} /*.ping_distop span a{ float:right; width:20px; height:20px; background:url(images/star.png) -24px 0 no-repeat; margin-right:3px;}*/ .list_style ol li{list-style-type: decimal;margin-left: 20px;} .list_style ul li{list-style-type: disc;margin-left: 20px;} +span.author { font-size: 0.9em; color: #888; } /* 创建作品 work */ .Newwork{ width:668px; height:418px;} diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 94e3fa85a..c455a5998 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -99,6 +99,7 @@ a.linkGrey6:hover {color:#ffffff !important;} .mr40{ margin-right:40px !important;} .mr65 {margin-right: 65px;} .mw20{ margin: 0 20px;} +.mw380 {max-width: 380px !important;} .mw400 {max-width: 400px !important;} .mt-20 {margin-top:-20px;} .mt-4 {margin-top: -4px;} diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 0a3732ced..9d37dc1cb 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -180,6 +180,7 @@ h4{ font-size:14px; color:#3b3b3b;} .h150{ height:150px;} .p10 {padding-left:10px; padding-right:10px;} .mw360 {max-width: 360px !important;} +.mw380 {max-width: 380px !important;} .mw400 {max-width: 400px !important;} .mh18 {max-height: 18px;} @@ -1136,4 +1137,4 @@ a.program-btn{background: url(../images/homepage_icon.png) -86px -393px no-repea .mediaIco{margin: 30px 0 30px 20px;width: 200px;} /*排序样式*/ a.st_up{ display: block; width:8px; float:left; height:13px; background:url(../images/pic_up.png) 0 0 no-repeat; margin-top:5px; margin-left:3px;} -a.st_down{ display: block; width:8px; float:left; height:13px; background:url(../images/pic_up.png) 0 -22px no-repeat; margin-top:5px; margin-left:3px;} +a.st_down{ display: block; width:8px; float:left; height:13px; background:url(../images/pic_up.png) 0 -22px no-repeat; margin-top:5px; margin-left:3px;} From aa1cbcdf878dfb7d01371d33a8e4cf4a37bb67d9 Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 22 Mar 2016 16:44:53 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E7=95=99=E8=A8=80?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E5=8A=A0=E5=85=A5=E4=B8=AA=E4=BA=BA=E5=8A=A8?= =?UTF-8?q?=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 4 +++- app/views/users/_user_activities.html.erb | 4 +++- app/views/users/show.html.erb | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 9039fd041..52a610bc5 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1223,7 +1223,7 @@ class UsersController < ApplicationController @page = params[:page] ? params[:page].to_i + 1 : 0 user_project_ids = (@user.projects.visible.map{|project| project.id}-shield_project_ids).empty? ? "(-1)" : "(" + (@user.projects.visible.map{|project| project.id}-shield_project_ids).join(",") + ")" user_course_ids = (@user.courses.visible.map{|course| course.id}-shield_course_ids).empty? ? "(-1)" : "(" + (@user.courses.visible.map{|course| course.id}-shield_course_ids).join(",") + ")" - course_types = "('Message','News','HomeworkCommon','Poll','Course')" + course_types = "('Message','News','HomeworkCommon','Poll','Course','JournalsForMessage')" project_types = "('Message','Issue','ProjectCreateInfo')" principal_types = "JournalsForMessage" if params[:type].present? @@ -1236,6 +1236,8 @@ class UsersController < ApplicationController @user_activities = UserActivity.where("container_type = 'Course' and container_id in #{user_course_ids} and act_type = 'Message'").order('updated_at desc').limit(10).offset(@page * 10) when "course_poll" @user_activities = UserActivity.where("container_type = 'Course' and container_id in #{user_course_ids} and act_type = 'Poll'").order('updated_at desc').limit(10).offset(@page * 10) + when "course_journals" + @user_activities = UserActivity.where("container_type = 'Course' and container_id in #{user_course_ids} and act_type = 'JournalsForMessage'").order('updated_at desc').limit(10).offset(@page * 10) when "project_issue" @user_activities = UserActivity.where("container_type = 'Project' and container_id in #{user_project_ids} and act_type = 'Issue'").order('updated_at desc').limit(10).offset(@page * 10) when "project_message" diff --git a/app/views/users/_user_activities.html.erb b/app/views/users/_user_activities.html.erb index eb73f9226..83d2527cf 100644 --- a/app/views/users/_user_activities.html.erb +++ b/app/views/users/_user_activities.html.erb @@ -69,7 +69,9 @@ <% when 'Poll' %> <%= render :partial => 'course_poll', :locals => {:activity => act, :user_activity_id => user_activity.id} %> <% when 'Course'%> - <%= render :partial => 'users/course_create', :locals => {:activity => act, :user_activity_id => act.id} %> + <%= render :partial => 'users/course_create', :locals => {:activity => act, :user_activity_id => user_activity.id} %> + <% when 'JournalsForMessage'%> + <%= render :partial => 'users/course_journalsformessage', :locals => {:activity => act, :user_activity_id => user_activity.id} %> <% end %> <% end %> <% when 'Project' %> diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index fa4eaacbe..2fe9ab079 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -14,6 +14,7 @@
  • <%= link_to "论坛动态", {:controller => "users", :action => "show", :type => "course_message"}, :class => "homepagePostTypeForum postTypeGrey"%>
  • <%= link_to "问卷动态", {:controller => "users", :action => "show", :type => "course_poll"}, :class => "homepagePostTypeQuiz postTypeGrey"%> +
  • <%= link_to "课程留言", {:controller => "users", :action => "show", :type => "course_journals"}, :class =>"homepagePostTypeMessage postTypeGrey"%> @@ -30,7 +31,7 @@
    • 更多
    • -
    • <%= link_to "留言动态", {:controller => "users", :action => "show", :type => "user_journals"}, :class =>"homepagePostTypeMessage postTypeGrey"%> +
    • <%= link_to "个人留言", {:controller => "users", :action => "show", :type => "user_journals"}, :class =>"homepagePostTypeMessage postTypeGrey"%>
    • <%= link_to "我的动态", {:controller => "users", :action => "show", :type => "current_user"}, :class =>"homepagePostTypeMine postTypeGrey"%>
    • <%= link_to "全部动态", {:controller => "users", :action => "show", :type => nil}, :class =>"homepagePostTypeAll postTypeGrey"%>
    From fe35bb3b44b76e5d8c405f0bc872708dffb721f4 Mon Sep 17 00:00:00 2001 From: cxt Date: Wed, 23 Mar 2016 14:42:27 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E6=89=93=E5=BC=80?= =?UTF-8?q?=E4=BD=9C=E5=93=81=E5=88=97=E8=A1=A8=E6=8A=A5500?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/student_work/_programing_work_show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/student_work/_programing_work_show.html.erb b/app/views/student_work/_programing_work_show.html.erb index 20d6df9ba..6bcda51da 100644 --- a/app/views/student_work/_programing_work_show.html.erb +++ b/app/views/student_work/_programing_work_show.html.erb @@ -59,7 +59,7 @@ <% if x["status"].to_i != 0 %> 测试错误! 您的输出: -
    <%=x["result"]%>
    +
    <%=x["result"].force_encoding("UTF-8")%>
    正确输出:
    <%=x["output"]%>