46 lines
2.5 KiB
Plaintext
46 lines
2.5 KiB
Plaintext
<% has_commit = has_commit_poll?(activity.id ,User.current)%>
|
|
<% poll_name = activity.polls_name.empty? ? l(:label_poll_new) : activity.polls_name%>
|
|
<div class="resources mt10">
|
|
<div class="homepagePostBrief mt10">
|
|
<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 => "90", :height => "90"), user_path(activity.user_id), :alt => "用户头像" %>
|
|
</div>
|
|
<div class="homepagePostDes">
|
|
<div class="homepagePostTo" style="word-break:break-all;">
|
|
<% 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+" | 问卷", course_path(activity.polls_group_id), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
|
|
<!--<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a>-->
|
|
</div>
|
|
<div class="homepagePostTitle" style="word-break:break-all;">
|
|
<%#= 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="homepagePostSubmitContainer">
|
|
<div class="homepagePostDeadline">发布时间:<%= format_date(activity.published_at) %></div>
|
|
</div>
|
|
<div class="homepagePostIntro break_word" id="activity_description_<%= user_activity.id%>">问卷描述:<%=activity.polls_description.html_safe.to_s%></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> |