2015-09-24 12:17:14 +08:00
|
|
|
|
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_activity_KindEditor","forum" %>
|
2014-11-14 10:54:05 +08:00
|
|
|
|
<style type="text/css">
|
2015-09-18 17:44:16 +08:00
|
|
|
|
/*回复框*/
|
|
|
|
|
div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
|
|
|
|
|
span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}
|
|
|
|
|
span.ke-toolbar-icon-url{background-image:url( /images/public_icon.png )}
|
|
|
|
|
div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}
|
|
|
|
|
span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
|
|
|
|
|
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
|
|
|
|
|
div.ke-toolbar .ke-outline{border:none;}
|
2015-09-24 12:17:14 +08:00
|
|
|
|
.ke-inline-block{display: none;}
|
|
|
|
|
div.ke-container{float:left;}
|
2014-11-14 10:54:05 +08:00
|
|
|
|
</style>
|
2015-09-18 17:44:16 +08:00
|
|
|
|
<script>
|
2015-09-24 12:17:14 +08:00
|
|
|
|
function expand_reply(container,btnid){
|
|
|
|
|
var target = $(container).children();
|
|
|
|
|
var btn = $(btnid);
|
|
|
|
|
if(btn.data('init')=='0'){
|
|
|
|
|
btn.data('init',1);
|
|
|
|
|
btn.html('收起回复('+btn.data('count')+')');
|
|
|
|
|
target.show();
|
|
|
|
|
}else{
|
|
|
|
|
btn.data('init',0);
|
|
|
|
|
btn.html('展开更多('+btn.data('count')+')');
|
|
|
|
|
target.hide();
|
|
|
|
|
target.eq(0).show();
|
|
|
|
|
target.eq(1).show();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$(function() {
|
|
|
|
|
init_activity_KindEditor_data(<%= @memo.id%>,null,"87%");
|
|
|
|
|
});
|
2015-09-28 12:02:38 +08:00
|
|
|
|
|
|
|
|
|
function del_confirm(){
|
|
|
|
|
if(confirm('确认删除么?')){
|
|
|
|
|
$("#del_link").click();
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
2015-09-18 17:44:16 +08:00
|
|
|
|
</script>
|
|
|
|
|
<div class="postRightContainer">
|
|
|
|
|
<div class="postThemeContainer">
|
|
|
|
|
<div class="postDetailPortrait">
|
|
|
|
|
<%= link_to image_tag(url_to_avatar(@memo.author),:width=>50,:height => 50,:alt=>'贴吧图像' ),user_path(@memo.author) %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="postThemeWrap">
|
2015-09-23 17:09:21 +08:00
|
|
|
|
<% if @memo.author.id == User.current.id%>
|
|
|
|
|
<div class="homepagePostSetting">
|
|
|
|
|
<ul>
|
|
|
|
|
<li class="homepagePostSettingIcon">
|
|
|
|
|
<ul class="homepagePostSettiongText">
|
2015-09-24 09:40:53 +08:00
|
|
|
|
<li><a href="<%= edit_forum_memo_path(@memo.forum,@memo)%>" class="postOptionLink">编辑</a></li>
|
2015-09-28 12:02:38 +08:00
|
|
|
|
<li><a href="javascript:void(0);" class="postOptionLink" onclick="del_confirm();">删除</a></li>
|
|
|
|
|
<li style="display: none"><a href="<%= forum_memo_path(@memo.forum,@memo) %>" data-method="delete" id="del_link" ></a></li>
|
2015-09-23 17:09:21 +08:00
|
|
|
|
</ul>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<%end%>
|
2015-09-29 13:54:54 +08:00
|
|
|
|
<div class="postDetailTitle">
|
|
|
|
|
<a href="javascript:void(0);" class="f14 linkGrey4 fb" style="word-break: break-all; word-wrap:break-word;white-space:pre-wrap;">主题: <%= @memo.subject%></a>
|
|
|
|
|
<%= render :partial => "memos/praise_tread",:locals => {:obj => @memo,:show_flag => true,:user_id =>User.current.id,:horizontal => true}%>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2015-09-18 17:44:16 +08:00
|
|
|
|
<div class="postDetailCreater"><a href="javascript:void(0);" class="linkBlue2" target="_blank"><%= @memo.author.name%></a></div>
|
|
|
|
|
<div class="postDetailDate mb5"><%= format_date( @memo.created_at)%></div>
|
2015-09-29 13:54:54 +08:00
|
|
|
|
|
2015-09-29 10:13:25 +08:00
|
|
|
|
<div class="memo-content" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" >
|
2015-09-18 17:44:16 +08:00
|
|
|
|
<%= @memo.content.html_safe%>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
2015-09-28 14:35:55 +08:00
|
|
|
|
<div class=" fl" style="width: 600px">
|
2015-09-18 17:44:16 +08:00
|
|
|
|
<% if @memo.attachments.any?%>
|
|
|
|
|
<% options = {:author => true, :deletable => @memo.deleted_attach_able_by?(User.current) } %>
|
|
|
|
|
<%= render :partial => 'attachments_links', :locals => {:attachments => @memo.attachments, :options => options, :is_float => true} %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<div class="homepagePostReply">
|
2015-09-24 12:17:14 +08:00
|
|
|
|
<div class="homepagePostReplyBanner">
|
|
|
|
|
<div class="homepagePostReplyBannerCount">回复(<%=@reply_count %>)</div>
|
|
|
|
|
<div class="homepagePostReplyBannerTime"></div>
|
|
|
|
|
<div class="homepagePostReplyBannerMore">
|
2015-09-25 16:34:01 +08:00
|
|
|
|
<% if @reply_count > 2%>
|
2015-09-24 12:17:14 +08:00
|
|
|
|
<a href="javascript:void(0);" class="replyGrey" id="reply_btn_<%= @memo.id%>" onclick="expand_reply('#reply_div_<%= @memo.id %>','#reply_btn_<%= @memo.id%>')" data-count="<%= @reply_count %>" data-init="0" >点击展开更多回复</a>
|
2015-09-25 16:34:01 +08:00
|
|
|
|
<% end %>
|
2015-09-24 12:17:14 +08:00
|
|
|
|
</div>
|
2015-09-18 17:44:16 +08:00
|
|
|
|
</div>
|
2015-09-24 12:17:14 +08:00
|
|
|
|
<div class="" id="reply_div_<%= @memo.id %>">
|
|
|
|
|
<% @replies.each_with_index do |reply,i| %>
|
|
|
|
|
<div class="homepagePostReplyContainer" style="display: <%= i >= 2 ? 'none':''%>">
|
|
|
|
|
<div class="homepagePostReplyPortrait">
|
|
|
|
|
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
|
2015-09-18 17:44:16 +08:00
|
|
|
|
</div>
|
2015-09-24 12:17:14 +08:00
|
|
|
|
<div class="homepagePostReplyDes">
|
|
|
|
|
<div class="homepagePostReplyPublisher"><a href="<%=user_path(reply.author)%>" class="newsBlue mr10 f14"><%= reply.author.name%></a><%= format_date(reply.created_at) %></div>
|
2015-09-18 17:44:16 +08:00
|
|
|
|
<div class="homepagePostReplyContent"><%= reply.content.html_safe%></div>
|
2015-09-24 12:17:14 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
|
|
|
|
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= @memo.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div>
|
|
|
|
|
<div class="homepagePostReplyInputContainer mb10">
|
|
|
|
|
<div nhname='new_message_<%= @memo.id%>' style="display:none;">
|
|
|
|
|
<%= form_for('memo',:url=>forum_memos_path,:method => "post") do |f|%>
|
2015-09-19 10:12:58 +08:00
|
|
|
|
<%= f.hidden_field :subject, :required => true, value: @memo.subject %>
|
|
|
|
|
<%= f.hidden_field :forum_id, :required => true, value: @memo.forum_id %>
|
|
|
|
|
<%= f.hidden_field :parent_id, :required => true, value: @memo.id %>
|
2015-09-18 17:44:16 +08:00
|
|
|
|
<%= hidden_field_tag :quote,"",:required => false,:style => 'display:none' %>
|
2015-09-24 12:17:14 +08:00
|
|
|
|
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @memo.id%>' name="memo[content]"></textarea>
|
|
|
|
|
<div nhname='toolbar_container_<%= @memo.id%>' style="float:left;padding-top:3px; margin-left: 5px;"></div>
|
|
|
|
|
<a id="new_message_submit_btn_<%= @memo.id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<p nhname='contentmsg_<%= @memo.id%>'></p>
|
|
|
|
|
<% end%>
|
2014-11-21 15:03:56 +08:00
|
|
|
|
</div>
|
2015-09-18 17:44:16 +08:00
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
2014-11-20 17:24:45 +08:00
|
|
|
|
</div>
|
2015-09-18 17:44:16 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|