">
<%= @count %>
|
<%=news.course_id %>
|
<%=link_to(news.course.name, course_path(news.course)) %>
|
<%=link_to(news.course.try(:teacher).try(:realname), user_path(news.course.teacher)) %>
|
<%= news.try(:author)%><% else %><%=news.try(:author).try(:realname) %><% end %>'>
<% if news.try(:author).try(:realname) == ' '%>
<%= link_to(news.try(:author), user_path(news.author)) %>
<% else %>
<%= link_to(news.try(:author).try(:realname), user_path(news.author)) %>
<% end %>
|
<%= format_date(news.created_on) %>
|
<%= link_to(news.title, news_path(news)) %>
|
<%=news.comments_count %>
|
<% end %>