From e6763c6d0cff36ba9f9ffe24581189cfb14de72d Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 7 Dec 2016 09:00:33 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=B6=88=E6=81=AF=E9=93=83?= =?UTF-8?q?=E9=93=9B=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 1 + app/helpers/users_helper.rb | 22 ++--- app/views/layouts/new_base_user.html.erb | 12 +-- .../users/_applied_project_content.html.erb | 6 +- .../_apply_homework_course_message.html.erb | 2 +- .../_apply_resource_course_message.html.erb | 2 +- ...ply_resource_course_message_reply.html.erb | 2 +- app/views/users/_new_user_message.html.erb | 27 ++++++ app/views/users/_user_at_message.html.erb | 2 +- .../_user_message_applide_action.html.erb | 14 +-- .../users/_user_message_applied.html.erb | 2 +- .../_user_message_applied_schools.html.erb | 2 +- app/views/users/_user_message_course.html.erb | 91 +++++++++--------- app/views/users/_user_message_forge.html.erb | 33 +++---- app/views/users/_user_message_org.html.erb | 15 +-- app/views/users/_user_message_system.html.erb | 6 +- .../_user_message_userfeedaback.html.erb | 4 +- app/views/users/user_messages.html.erb | 27 +----- public/images/user/home-user-left.png | Bin 0 -> 111449 bytes public/stylesheets/css/structure.css | 14 +-- public/stylesheets/css/user.css | 2 +- 21 files changed, 147 insertions(+), 139 deletions(-) create mode 100644 app/views/users/_new_user_message.html.erb create mode 100644 public/images/user/home-user-left.png diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 1ffc4f0d7..1da7355f4 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -433,6 +433,7 @@ class UsersController < ApplicationController render_404 return end + @message_alls = paginateHelper @message_alls, 25 respond_to do |format| format.html{render :layout=>'new_base_user'} diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index e5dcfc2df..b0570bb24 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -56,12 +56,8 @@ module UsersHelper # 用户项目总数 def user_project_count - @my_projects = @user.projects.where("projects.user_id = #{@user.id}").select("projects.*,(SELECT MAX(updated_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS updatetime").order("updatetime DESC") - @my_projects_count = @my_projects.count - @my_joined_projects = @user.projects.where("projects.user_id != #{@user.id}").select("projects.*,(SELECT MAX(updated_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS updatetime").order("updatetime DESC") - @my_joined_projects_count = @my_joined_projects.count - - @my_project_total = @my_projects_count + @my_joined_projects_count + @my_projects = @user.projects.select("projects.*,(SELECT MAX(updated_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS updatetime").order("updatetime DESC") + @my_project_total = @my_projects.count end # 用户的课程总数 @@ -131,13 +127,13 @@ module UsersHelper def pull_request_message_status ma case ma.status when 1 - "创建了PullRequest:" + "创建了PullRequest:" when 2 - "接受了PullRequest:" + "接受了PullRequest:" when 3 - "重新打开了PullRequest:" + "重新打开了PullRequest:" when 4 - "关闭了PullRequest:" + "关闭了PullRequest:" end end @@ -172,11 +168,11 @@ module UsersHelper def applied_project_tip applied_message case applied_message.status when 4 - "拒绝申请加入项目:" + "拒绝申请加入:" when 5,3,2,1,7 - "申请加入项目:" + "申请加入:" when 6 - "同意申请加入项目" + "同意申请加入:" end end diff --git a/app/views/layouts/new_base_user.html.erb b/app/views/layouts/new_base_user.html.erb index 906b0c6f5..af76ad8d6 100644 --- a/app/views/layouts/new_base_user.html.erb +++ b/app/views/layouts/new_base_user.html.erb @@ -164,7 +164,7 @@ <% if hidden_unproject_infos %>
例如,您缺评了两份作品,则您的最终成绩将被扣除 <%= ma.course_message.homework_detail_manual.absence_penalty %> * 2 = <%= ma.course_message.homework_detail_manual.absence_penalty * 2 %>分
<% end%> -祝您的教学活动高效、顺利、愉快!
<% end %> -您的班级是私有的,非班级成员不能访问您的班级。如果想设置为公开,您可以在配置中设置。
<% end %> -申请职位:<%= ma.content == '9' ? "教师" : "教辅"%>
-