个人主页报错
This commit is contained in:
parent
c8b1bb5d64
commit
e2af9e26f8
|
@ -54,7 +54,7 @@
|
|||
<%= link_to "<div class='mt5 mb8'>#{image_tag(url_to_avatar(User.current),:width =>"40",:height => "40",:alt=>"头像", :id => "nh_user_logo")}</div>".html_safe,user_activities_path(User.current.id)%>
|
||||
<ul class="topnav_login_list">
|
||||
<li><a href="javascript:void(0);" class="menuGrey">修改资料</a> </li>
|
||||
<li><a href="javascript:void(0);" class="menuGrey">账号设置</a> </li>
|
||||
<!--<li><a href="javascript:void(0);" class="menuGrey">账号设置</a> </li>-->
|
||||
<li><a href="javascript:void(0);" class="menuGrey">退出</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
<div class="homepagePostReply">
|
||||
<div class="homepagePostReplyBanner">
|
||||
<div class="homepagePostReplyBannerCount">回复(<%=activity.comments_count %>)</div>
|
||||
<div class="homepagePostReplyBannerTime"><%=format_date(activity.updated_on)%></div>
|
||||
<div class="homepagePostReplyBannerTime"><%#=format_date(activity.updated_on)%></div>
|
||||
<div class="homepagePostReplyBannerMore"><a href="javascript:void(0);" class="replyGrey">点击展开更多回复</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -27,31 +27,27 @@
|
|||
</div>
|
||||
<% @user_activities.each do |user_activity|
|
||||
unless @user_activities.nil? %>
|
||||
<% act= user_activity.act %>
|
||||
<% case user_activity.act_type.to_s %>
|
||||
<% when 'CourseActivity' %>
|
||||
<% @course_act= CourseActivity.where("id=#{user_activity.act_id}").first %>
|
||||
<% unless @course_act.nil? %>
|
||||
<% case @course_act.course_act_type.to_s %>
|
||||
<% if act %>
|
||||
<% activity= act.course_act %>
|
||||
<% case act.course_act_type.to_s %>
|
||||
<% when 'HomeworkCommon' %>
|
||||
<% @activity=HomeworkCommon.where("id=#{@course_act.course_act_id}").first %>
|
||||
<%= render :partial => 'course_homework', :locals => {:activity => @activity,:user_activity =>user_activity} %>
|
||||
<%= render :partial => 'course_homework', :locals => {:activity => activity,:user_activity =>user_activity} %>
|
||||
<% when 'News' %>
|
||||
<% @activity=News.where("id=#{@course_act.course_act_id}").first %>
|
||||
<%= render :partial => 'course_news', :locals => {:activity => @activity,:user_activity =>user_activity} %>
|
||||
<%= render :partial => 'course_news', :locals => {:activity => activity,:user_activity =>user_activity} %>
|
||||
<% when 'Message'%>
|
||||
<% @activity=Message.where("id=#{@course_act.course_act_id}").first %>
|
||||
<%= render :partial => 'course_message', :locals => {:activity => @activity,:user_activity =>user_activity} %>
|
||||
<%= render :partial => 'course_message', :locals => {:activity => activity,:user_activity =>user_activity} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% when 'ForgeActivity' %>
|
||||
<% @project_act= ForgeActivity.where("id=#{user_activity.act_id}").first %>
|
||||
<% case @project_act.forge_act_type.to_s %>
|
||||
<% activity= act.forge_act unless act.forge_act_type == "ProjectCreateInfo" %>
|
||||
<% case act.forge_act_type.to_s %>
|
||||
<% when 'Issue' %>
|
||||
<% @activity=Issue.where("id=#{@project_act.forge_act_id}").first %>
|
||||
<%= render :partial => 'project_issue', :locals => {:activity => @activity,:user_activity =>user_activity} %>
|
||||
<%= render :partial => 'project_issue', :locals => {:activity => activity,:user_activity =>user_activity} %>
|
||||
<% when 'Message' %>
|
||||
<% @activity=Message.where("id=#{@project_act.forge_act_id}").first %>
|
||||
<%= render :partial => 'project_message', :locals => {:activity => @activity,:user_activity =>user_activity} %>
|
||||
<%= render :partial => 'project_message', :locals => {:activity => activity,:user_activity =>user_activity} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue