<% has_commit = has_commit_poll?(activity.id ,User.current)%> <% poll_name = activity.polls_name.empty? ? l(:label_poll_new) : activity.polls_name%> <% if ( activity.polls_status==2) %>
<%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50"), user_path(activity.user_id), :alt => "用户头像" %>
<% if activity.try(:user).try(:realname) == ' ' %> <%= link_to activity.try(:user), user_path(activity.user_id), :class => "newsBlue mr15" %> <% else %> <%= link_to activity.try(:user).try(:realname), user_path(activity.user_id), :class => "newsBlue mr15" %> <% end %> TO <%= link_to Course.find(activity.polls_group_id).name.to_s+" | 问卷", poll_index_path(:polls_type => "Course", :polls_group_id => activity.polls_group_id), :class => "newsBlue ml15" %>
<%#= link_to activity.polls_name.to_s/*+"(问卷名称)"*/, %> <% if has_commit %> <%= link_to poll_name, poll_result_poll_path(activity.id), :class => "postGrey"%> <% else %> <%= link_to poll_name, poll_path(activity.id), :class => "postGrey"%> <% end %>
发布时间:<%= format_time(activity.published_at) %>
<%=activity.polls_description.html_safe.to_s%>
<% end %>