From cf0fd2022d8c85954227e6a83367d80755afb703 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Mon, 19 Oct 2015 14:58:44 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=88=9B=E5=BB=BA=E5=8A=A8?= =?UTF-8?q?=E6=80=81=20=20=20=E9=A1=B9=E7=9B=AE=E5=88=9B=E5=BB=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/_project_create.html.erb | 31 +++++++++++++++-------- app/views/users/_user_activities.html.erb | 10 +++++++- 3 files changed, 31 insertions(+), 14 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 90fdbe837..d25dd6fd2 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -881,8 +881,8 @@ class UsersController < ApplicationController @page = params[:page] ? params[:page].to_i + 1 : 0 user_project_ids = @user.projects.visible.empty? ? "(-1)" : "(" + @user.projects.visible.map{|project| project.id}.join(",") + ")" user_course_ids = @user.courses.visible.empty? ? "(-1)" : "(" + @user.courses.visible.map{|course| course.id}.join(",") + ")" - course_types = "('Message','News','HomeworkCommon','Poll')" - project_types = "('Message','Issue')" + course_types = "('Message','News','HomeworkCommon','Poll','Course')" + project_types = "('Message','Issue','ProjectCreateInfo')" principal_types = "JournalsForMessage" if params[:type].present? case params[:type] diff --git a/app/views/users/_project_create.html.erb b/app/views/users/_project_create.html.erb index d07cb4a2d..8e3b5a5dc 100644 --- a/app/views/users/_project_create.html.erb +++ b/app/views/users/_project_create.html.erb @@ -1,18 +1,27 @@ +<% project = Project.find(activity.act_id) %> +<% user = User.find(project.user_id)%>