<% 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), :alt => "用户头像" %> <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %>
<% if activity.try(:user).try(:realname) == ' ' %> <%= link_to activity.try(:user), user_path(activity.user), :class => "newsBlue mr15" %> <% else %> <%= link_to activity.try(:user).try(:realname), user_path(activity.user), :class => "newsBlue mr15" %> <% end %> TO <% course = Course.find(activity.polls_group_id) %> <%= link_to course.name.to_s+" | 问卷", poll_index_path(:polls_type => "Course", :polls_group_id => activity.polls_group_id), :class => "newsBlue" %>
<%#= 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) %>
更新时间:<%= format_time(CourseActivity.where("course_act_type='#{activity.class}' and course_act_id =#{activity.id}").first.updated_at) %>
<%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>activity.polls_description} %>
<% end %>