个人主页动态
This commit is contained in:
parent
7c3544dfec
commit
caec5e5490
|
@ -74,6 +74,8 @@ class UsersController < ApplicationController
|
||||||
include WordsHelper
|
include WordsHelper
|
||||||
include GitlabHelper
|
include GitlabHelper
|
||||||
include UserScoreHelper
|
include UserScoreHelper
|
||||||
|
|
||||||
|
include PollHelper
|
||||||
helper :user_score
|
helper :user_score
|
||||||
helper :journals
|
helper :journals
|
||||||
|
|
||||||
|
@ -575,7 +577,7 @@ class UsersController < ApplicationController
|
||||||
@type = params[:type]
|
@type = params[:type]
|
||||||
user_project_ids = @user.projects.visible.empty? ? "(-1)" : "(" + @user.projects.visible.map{|project| project.id}.join(",") + ")"
|
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(",") + ")"
|
user_course_ids = @user.courses.visible.empty? ? "(-1)" : "(" + @user.courses.visible.map{|course| course.id}.join(",") + ")"
|
||||||
course_types = "('Message','News','HomeworkCommon')"
|
course_types = "('Message','News','HomeworkCommon','poll')"
|
||||||
project_types = "('Message','Issue')"
|
project_types = "('Message','Issue')"
|
||||||
if @type
|
if @type
|
||||||
case @type
|
case @type
|
||||||
|
|
|
@ -23,7 +23,13 @@
|
||||||
<div class="homepagePostSubmitContainer">
|
<div class="homepagePostSubmitContainer">
|
||||||
<div class="homepagePostDeadline">时间:<%= format_date(activity.created_on) %></div>
|
<div class="homepagePostDeadline">时间:<%= format_date(activity.created_on) %></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostIntro" style="word-break:break-all">(描述)<%= activity.content.html_safe %></div>
|
<div class="homepagePostIntro" style="word-break:break-all">(描述)
|
||||||
|
<% if activity.parent_id.nil? %>
|
||||||
|
<%= activity.content.to_s.html_safe%>
|
||||||
|
<% else %>
|
||||||
|
<%= activity.parent.content.to_s.html_safe%>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
|
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="homepagePostSettingIcon">
|
<li class="homepagePostSettingIcon">
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
<%# has_commit = has_commit_poll?(activity.id ,User.current)%>
|
||||||
|
<% poll_name = activity.polls_name.empty? ? l(:label_poll_new) : activity.polls_name%>
|
||||||
<div class="resources mt15">
|
<div class="resources mt15">
|
||||||
<div class="homepagePostBrief">
|
<div class="homepagePostBrief">
|
||||||
<div class="homepagePostPortrait">
|
<div class="homepagePostPortrait">
|
||||||
|
@ -16,7 +18,12 @@
|
||||||
<!--<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a>-->
|
<!--<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a>-->
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostTitle" style="word-break:break-all;">
|
<div class="homepagePostTitle" style="word-break:break-all;">
|
||||||
<a href="javascript:void(0);" class="postGrey"><%=activity.polls_name.to_s%>(问卷名称)</a>
|
<%#= link_to activity.polls_name.to_s+"(问卷名称)", %>
|
||||||
|
<%# if has_commit %>
|
||||||
|
<%#= link_to poll_name, poll_result_poll_path(activity.id), :class => "polls_title polls_title_w fl c_dblue"%>
|
||||||
|
<%# else %>
|
||||||
|
<%= link_to poll_name+"(问卷名称)", poll_path(activity.id), :class => "postGrey"%>
|
||||||
|
<%# end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostSubmitContainer">
|
<div class="homepagePostSubmitContainer">
|
||||||
<div class="homepagePostDeadline">时间:<%= format_date(activity.created_at) %></div>
|
<div class="homepagePostDeadline">时间:<%= format_date(activity.created_at) %></div>
|
||||||
|
|
|
@ -1311,6 +1311,7 @@ ActiveRecord::Schema.define(:version => 20150826061843) do
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
t.integer "late_penalty", :default => 0
|
t.integer "late_penalty", :default => 0
|
||||||
t.integer "absence_penalty", :default => 0
|
t.integer "absence_penalty", :default => 0
|
||||||
|
t.integer "system_score"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "student_works_evaluation_distributions", :force => true do |t|
|
create_table "student_works_evaluation_distributions", :force => true do |t|
|
||||||
|
@ -1528,7 +1529,6 @@ ActiveRecord::Schema.define(:version => 20150826061843) do
|
||||||
t.string "identity_url"
|
t.string "identity_url"
|
||||||
t.string "mail_notification", :default => "", :null => false
|
t.string "mail_notification", :default => "", :null => false
|
||||||
t.string "salt", :limit => 64
|
t.string "salt", :limit => 64
|
||||||
t.integer "gid"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "users", ["auth_source_id"], :name => "index_users_on_auth_source_id"
|
add_index "users", ["auth_source_id"], :name => "index_users_on_auth_source_id"
|
||||||
|
|
Loading…
Reference in New Issue