Merge branch 'sw_new_course' of http://repository.trustie.net/xianbo/trustie2 into sw_new_course

This commit is contained in:
sw 2015-08-26 17:58:04 +08:00
commit 19dc9de60f
3 changed files with 18 additions and 3 deletions

View File

@ -74,6 +74,8 @@ class UsersController < ApplicationController
include WordsHelper
include GitlabHelper
include UserScoreHelper
include PollHelper
helper :user_score
helper :journals
@ -585,7 +587,7 @@ class UsersController < ApplicationController
@type = params[:type]
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')"
course_types = "('Message','News','HomeworkCommon','poll')"
project_types = "('Message','Issue')"
if @type
case @type

View File

@ -23,7 +23,13 @@
<div class="homepagePostSubmitContainer">
<div class="homepagePostDeadline">时间:<%= format_date(activity.created_on) %></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">
<ul>
<li class="homepagePostSettingIcon">

View File

@ -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="homepagePostBrief">
<div class="homepagePostPortrait">
@ -16,7 +18,12 @@
<!--<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a>-->
</div>
<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 class="homepagePostSubmitContainer">
<div class="homepagePostDeadline">时间:<%= format_date(activity.created_at) %></div>