63 lines
3.3 KiB
Plaintext
63 lines
3.3 KiB
Plaintext
<% 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 => "用户头像" %>
|
|
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %>
|
|
</div>
|
|
<div class="homepagePostDes">
|
|
<div class="homepagePostTo break_word mt-4">
|
|
<% 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>
|
|
<div class="homepagePostDate fl">
|
|
发布时间:<%= format_time(activity.published_at) %>
|
|
</div>
|
|
<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>
|
|
<%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>activity.polls_description} %>
|
|
<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>
|
|
<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>
|
|
<% end %>
|
|
<script type="text/javascript">
|
|
$(function(){
|
|
user_card_show_hide();
|
|
});
|
|
</script>
|