socialforge/app/views/users/_course_poll.html.erb

48 lines
2.5 KiB
Plaintext
Raw Normal View History

2015-08-28 17:25:42 +08:00
<% has_commit = has_commit_poll?(activity.id ,User.current)%>
2015-08-26 17:58:48 +08:00
<% poll_name = activity.polls_name.empty? ? l(:label_poll_new) : activity.polls_name%>
2015-09-06 17:40:55 +08:00
<% if ( activity.polls_status==2) %>
2015-08-28 11:55:34 +08:00
<div class="resources mt10">
<div class="homepagePostBrief">
2015-08-25 19:24:23 +08:00
<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 => "用户头像" %>
2015-08-25 19:24:23 +08:00
</div>
<div class="homepagePostDes">
<div class="homepagePostTo break_word">
2015-08-25 19:24:23 +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
2015-08-31 15:33:20 +08:00
<%= 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" %>
2015-08-25 19:24:23 +08:00
<!--<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a>-->
</div>
2015-08-29 16:59:13 +08:00
<div class="homepagePostTitle break_word" >
2015-08-28 17:25:42 +08:00
<%#= 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 %>
2015-08-25 19:24:23 +08:00
</div>
<div class="homepagePostDate">
2015-09-02 18:18:08 +08:00
发布时间:<%= format_time(activity.published_at) %>
2015-08-25 19:24:23 +08:00
</div>
<div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity_id%>"><%=activity.polls_description.html_safe.to_s%></div>
2015-09-01 15:17:40 +08:00
<div class="homepagePostSetting" id="act-<%= user_activity_id %>" style="visibility: hidden">
2015-08-25 19:24:23 +08:00
<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>
2015-09-06 15:31:26 +08:00
</div>
<% end %>