2015-10-16 10:54:22 +08:00
|
|
|
<% 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) %>
|
|
|
|
<div class="resources mt10">
|
|
|
|
<div class="homepagePostBrief">
|
|
|
|
<div class="homepagePostPortrait">
|
|
|
|
<!-- <a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a>-->
|
|
|
|
<%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50"), user_path(activity.user_id), :alt => "用户头像" %>
|
2016-01-07 10:10:24 +08:00
|
|
|
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %>
|
2015-10-16 10:54:22 +08:00
|
|
|
</div>
|
|
|
|
<div class="homepagePostDes">
|
2016-05-10 14:06:34 +08:00
|
|
|
<div class="homepagePostTo break_word">
|
2015-10-16 10:54:22 +08:00
|
|
|
<% 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" %>
|
|
|
|
<!--<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a>-->
|
|
|
|
</div>
|
|
|
|
<div class="homepagePostTitle break_word" >
|
|
|
|
<%#= 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 %>
|
|
|
|
</div>
|
2016-01-12 15:53:15 +08:00
|
|
|
<div class="homepagePostDate fl">
|
2015-10-16 10:54:22 +08:00
|
|
|
发布时间:<%= format_time(activity.published_at) %>
|
|
|
|
</div>
|
2016-01-12 15:53:15 +08:00
|
|
|
<div class="homepagePostDate fl ml15">
|
|
|
|
更新时间:<%= format_time(CourseActivity.where("course_act_type='#{activity.class}' and course_act_id =#{activity.id}").first.updated_at) %>
|
|
|
|
</div>
|
|
|
|
<div class="cl"></div>
|
2016-01-19 16:53:34 +08:00
|
|
|
<%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>activity.polls_description} %>
|
2015-10-22 17:42:02 +08:00
|
|
|
<div class="cl"></div>
|
|
|
|
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
|
|
|
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
|
|
|
<div class="cl"></div>
|
2015-10-16 10:54:22 +08:00
|
|
|
<div class="homepagePostSetting" id="act-<%= user_activity_id %>" style="visibility: hidden">
|
|
|
|
<ul>
|
|
|
|
<li class="homepagePostSettingIcon">
|
|
|
|
<ul class="homepagePostSettiongText">
|
|
|
|
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
|
|
|
|
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
|
|
|
|
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="cl"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-01-08 14:53:12 +08:00
|
|
|
<% end %>
|
2016-05-03 17:11:30 +08:00
|
|
|
<script type="text/javascript">
|
|
|
|
$(function(){
|
|
|
|
user_card_show_hide();
|
|
|
|
});
|
|
|
|
</script>
|