<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %>
<% if @ctivity.try(:author).try(:realname) == ' ' %> <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %> <% else %> <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %> <% end %> TO <%= link_to activity.course.name.to_s+" | 课程通知", course_path(activity.course), :class => "newsBlue ml15", :style => "word-break:break-all" %>
<%= link_to activity.title.to_s, news_path(activity), :class => "postGrey", :style => "word-break:break-all" %>
发布时间:<%= format_date(activity.created_on) %>
通知描述:<%= activity.description.html_safe %>
<% count=activity.comments_count %>
回复(<%= count %>)
<%#= format_date(activity.updated_on) %>
<%if count>2 %> <% end %>
<%#= render :partial => 'course_news_reply',:locals => { :contest => @contest, :journals => @jour, :state => false}%> <% replies_all_i = 0 %> <% unless activity.comments.empty? %>
    <% activity.comments.reorder("created_on desc").each do |comment| %> <% replies_all_i=replies_all_i+1 %>
  • <%= link_to image_tag(url_to_avatar(comment.author), :width => "45", :height => "45"), user_path(comment.author_id), :alt => "用户头像" %>
    <% if comment.try(:author).try(:realname) == ' ' %> <%= link_to comment.try(:author), user_path(comment.author_id), :class => "newsBlue mr10 f14" %> <% else %> <%= link_to comment.try(:author).try(:realname), user_path(comment.author_id), :class => "newsBlue mr10 f14" %> <% end %> <%= format_date(comment.created_on) %> <%#= link_to_if_authorized_course l(:button_delete), {:controller => 'comments', :action => 'destroy', :id => activity, :comment_id => comment}, :data => {:confirm => l(:text_are_you_sure)}, :method => :delete, :title => l(:button_delete) %>
    <%= comment.comments.html_safe %>
  • <% end %>
<% end %>