117 lines
6.2 KiB
Plaintext
117 lines
6.2 KiB
Plaintext
<div class="resources mt10">
|
|
<div class="homepagePostBrief">
|
|
<div class="homepagePostPortrait">
|
|
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %>
|
|
</div>
|
|
<div class="homepagePostDes">
|
|
<div class="homepagePostTo break_word">
|
|
<% if activity.try(:author).try(:realname) == ' ' %>
|
|
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
|
<% else %>
|
|
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
|
<% end %>
|
|
TO
|
|
<%= link_to activity.project.name.to_s+" | 项目讨论区",project_boards_path(activity.project), :class => "newsBlue ml15 mr5"%>
|
|
<!--<a href="javascript:void(0);" class="newsBlue ml15 mr5"><%= activity.project.name %>(项目讨论区)</a>-->
|
|
</div>
|
|
<div class="homepagePostTitle break_word">
|
|
<% if activity.parent_id.nil? %>
|
|
<%= link_to activity.subject.to_s.html_safe, project_boards_path(activity.project,:parent_id =>activity.id, :topic_id => activity.id), :class=> "postGrey"
|
|
%>
|
|
<% else %>
|
|
<%= link_to activity.parent.subject.to_s.html_safe, project_boards_path(activity.project,:parent_id =>activity.parent_id, :topic_id => activity.id), :class=> "postGrey"
|
|
%>
|
|
<% end %>
|
|
</div>
|
|
<div class="homepagePostDate">
|
|
时间:<%= format_date(activity.created_on) %>
|
|
</div>
|
|
<div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity.id%>">帖子描述:
|
|
<% if activity.parent_id.nil? %>
|
|
<%= activity.content.to_s.html_safe%>
|
|
<% else %>
|
|
<%= activity.parent.content.to_s.html_safe%>
|
|
<% end %>
|
|
</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 class="homepagePostReply">
|
|
<div class="homepagePostReplyBanner"><% count=0 %>
|
|
<div class="homepagePostReplyBannerCount">回复(
|
|
<% if activity.parent_id.nil? %>
|
|
<% count=activity.replies_count%>
|
|
<%=count %>
|
|
<% else %>
|
|
<% count=activity.parent.replies_count%>
|
|
<%=count %>
|
|
<% end %>
|
|
)</div>
|
|
<div class="homepagePostReplyBannerTime"><%#=format_date(activity.updated_on)%></div>
|
|
<%if count>2 %>
|
|
<div class="homepagePostReplyBannerMore"><a id="reply_btn_<%=user_activity.id%>" onclick="expand_reply('#reply_div_<%= user_activity.id %> li','#reply_btn_<%=user_activity.id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >点击展开更多回复(<%= count.to_s%>)</a></div>
|
|
<% end %>
|
|
<!--<div class="homepagePostReplyBannerMore"><a href="javascript:void(0);" nhname='reply_ex_btn' class="replyGrey">点击展开更多回复</a>
|
|
</div>-->
|
|
</div>
|
|
<!--<div class="homepagePostReplyInputContainer">
|
|
<textarea class="homepagePostReplyInput" placeholder="请输入回复"></textarea>
|
|
</div>
|
|
<div class="homepagePostReplyInputContainer">
|
|
<div class="homepagePostReplyEmotion"><a href="javascript:void(0);" class="replyGrey">表情</a></div>
|
|
<div class="homepagePostReplyCancel"><a href="javascript:void(0);" class="postReplyCancel">取消</a>
|
|
</div>
|
|
<div class="homepagePostReplySubmit"><a href="javascript:void(0);" class="postReplySubmit">发送</a>
|
|
</div>
|
|
<div class="cl"></div>
|
|
</div>-->
|
|
<% activity= activity.parent_id.nil? ? activity : activity.parent %>
|
|
<% replies_all_i = 0 %>
|
|
<% unless activity.children.empty? %>
|
|
<div id="reply_div_<%= user_activity.id %>">
|
|
<ul>
|
|
<% activity.children.reorder("created_on desc").each do |reply| %>
|
|
<% replies_all_i=replies_all_i+1 %>
|
|
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i>2 ? 'none' : '' %>">
|
|
<div class="homepagePostReplyPortrait">
|
|
<%= link_to image_tag(url_to_avatar(reply.author), :width => "45", :height => "45"), user_path(reply.author_id), :alt => "用户头像" %>
|
|
</div>
|
|
<div class="homepagePostReplyDes">
|
|
<div class="homepagePostReplyPublisher">
|
|
<% if reply.try(:author).try(:realname) == ' ' %>
|
|
<%= link_to reply.try(:author), user_path(reply.author_id), :class => "newsBlue mr10 f14" %>
|
|
<% else %>
|
|
<%= link_to reply.try(:author).try(:realname), user_path(reply.author_id), :class => "newsBlue mr10 f14" %>
|
|
<% end %>
|
|
<%= format_date(reply.created_on) %>
|
|
<%#= link_to(
|
|
l(:button_delete),
|
|
{:controller => 'messages', :action => 'destroy', :id => reply.id, :board_id => reply.board_id, :is_board => 'false'},
|
|
:method => :post,
|
|
:data => {:confirm => l(:text_are_you_sure)},
|
|
:title => l(:button_delete),
|
|
:class => 'replyGrey fr ml10'
|
|
) if reply.course_destroyable_by?(User.current) %>
|
|
<!--<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a>-->
|
|
</div>
|
|
<div class="homepagePostReplyContent break_word"><%= reply.content.html_safe %></div>
|
|
</div>
|
|
<div class="cl"></div>
|
|
</li>
|
|
<% end %>
|
|
</ul>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
</div> |