2015-09-18 17:44:16 +08:00
|
|
|
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_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;}
|
|
|
|
/*.ke-container{height: 80px !important;}*/
|
2014-11-14 10:54:05 +08:00
|
|
|
</style>
|
2015-09-18 17:44:16 +08:00
|
|
|
<script>
|
|
|
|
init_KindEditor_data('',30);
|
|
|
|
</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">
|
|
|
|
<div class="postDetailTitle"><a href="javascript:void(0);" class="f14 linkGrey4 fb">主题: <%= @memo.subject%></a></div>
|
|
|
|
<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>
|
|
|
|
<span id="praise_tread" style="float: right">
|
|
|
|
<%= render :partial => "memos/praise_tread",:locals => {:obj => @memo,:show_flag => true,:user_id =>User.current.id,:horizontal => true}%>
|
2015-07-23 10:50:48 +08:00
|
|
|
</span>
|
2015-09-18 17:44:16 +08:00
|
|
|
<div class="cl"></div>
|
2015-09-23 11:34:16 +08:00
|
|
|
<div class="fl fontGrey3" style="word-break:normal; width:auto; display:block; white-space:pre-wrap;word-wrap : break-word ;overflow: hidden ;">
|
2015-09-18 17:44:16 +08:00
|
|
|
<%= @memo.content.html_safe%>
|
|
|
|
</div>
|
|
|
|
<div class="cl"></div>
|
|
|
|
<div class="mt10 fl">
|
|
|
|
<% 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">
|
|
|
|
<div nhname='new_message' style="display:none;">
|
|
|
|
<%= form_for(@memo_new, url: forum_memos_path, :html => {:multipart => true}) do |f|%>
|
|
|
|
<%= 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 %>
|
|
|
|
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea' name="memo[content]"></textarea>
|
|
|
|
<p nhname='contentmsg'></p>
|
|
|
|
<div nhname='toolbar_container' style="float:left;padding-top:3px;"></div>
|
|
|
|
<a id="new_message_cancel_btn" href="javascript:void(0)" class="grey_n_btn fr " style="margin-top:6px;">取消</a>
|
|
|
|
<a id="new_message_submit_btn" href="javascript:void(0)" class="blue_n_btn fr mr5 " style="margin-top:6px;">留言</a>
|
2015-09-19 09:24:36 +08:00
|
|
|
<% end %>
|
2015-09-18 17:44:16 +08:00
|
|
|
</div>
|
|
|
|
<div class="cl"></div>
|
|
|
|
<% @replies.each do |reply| %>
|
|
|
|
<div class="homepagePostReplyContainer">
|
2015-09-23 11:42:08 +08:00
|
|
|
<div class="homepagePostReplyPortrait" style="width: 45px !important;">
|
2015-09-18 17:44:16 +08:00
|
|
|
<!--<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="45" height="45" alt="用户头像" /></a>-->
|
|
|
|
<%= link_to image_tag(url_to_avatar(reply.author), :width => 45,:height => 45), user_path(reply.author) %>
|
|
|
|
</div>
|
2015-09-23 11:42:08 +08:00
|
|
|
<div class="homepagePostReplyDes" style="width: 620px !important;">
|
2015-09-18 17:44:16 +08:00
|
|
|
<div class="homepagePostReplyPublisher"><a href="<%=user_path(reply.author)%>" class="newsBlue mr10 f14"><%= reply.author.name%></a>
|
|
|
|
<% if reply.parent && reply.parent.id != @memo.id%>
|
|
|
|
<span class="f14">回复</span><a href="<%= user_path(reply.parent.author)%>" class="newsBlue mr10 ml15 f14"><%= reply.parent.author.name%></a>
|
|
|
|
<% end %>
|
2013-11-26 16:32:08 +08:00
|
|
|
|
2015-09-18 17:44:16 +08:00
|
|
|
<%= format_date(reply.created_at)%>
|
|
|
|
<!--<a href="javascript:void(0);" class="replyGrey fr ml10" >删除</a>-->
|
|
|
|
<%= link_to(
|
|
|
|
l(:button_delete),
|
|
|
|
{:action => 'destroy', :id => reply},
|
|
|
|
:method => :delete,
|
|
|
|
:data => {:confirm => l(:text_are_you_sure)},
|
|
|
|
:title => l(:button_delete),:class=>'replyGrey fr ml10'
|
|
|
|
) if reply.destroyable_by?(User.current) %>
|
|
|
|
<a href="javascript:void(0);" class="newsBlue fr" nhname="reply_btn">回复</a></div>
|
|
|
|
<div class="homepagePostReplyContent"><%= reply.content.html_safe%></div>
|
|
|
|
<div nhname='div_form' class="mt10 ml80" style="display:none;">
|
|
|
|
<%= form_for(@memo_new, url: forum_memos_path, :method=>'post') do |f| %>
|
2014-09-17 14:55:36 +08:00
|
|
|
|
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' %>
|
|
|
|
<textarea name='memo[content]' style="display:none;"></textarea>
|
|
|
|
<p nhname='contentmsg'></p>
|
|
|
|
<div nhname='toolbar_container' style="float:left;padding-top:3px;"></div>
|
|
|
|
<a nhname="cancel_btn" href="javascript:;" class="grey_n_btn fr" style="margin-top:3px;">取消</a>
|
|
|
|
<a nhname="submit_btn" href="javascript:;" class="blue_n_btn fr mr5" style="margin-top:3px;">发布</a>
|
|
|
|
<% end %>
|
|
|
|
<div class="cl"></div>
|
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
|
|
|
<% end %>
|
|
|
|
<!--<div class="homepagePostReplyContainer borderBottomNone">-->
|
|
|
|
<!--<div class="homepagePostReplyPortrait"><a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="45" height="45" alt="用户头像" /></a></div>-->
|
|
|
|
<!--<div class="homepagePostReplyDes">-->
|
|
|
|
<!--<div class="homepagePostReplyPublisher">-->
|
|
|
|
<!--<a href="javascript:void(0);" class="newsBlue mr15 f14">linchun</a>-->
|
|
|
|
<!--<span class="f14">回复</span><a href="javascript:void(0);" class="newsBlue mr10 ml15 f14">Tangxiang</a>刚刚-->
|
|
|
|
<!--<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a><a href="javascript:void(0);" class="newsBlue fr">回复</a></div>-->
|
|
|
|
<!--<div class="homepagePostReplyContent">点击设置就可以了。</div>-->
|
|
|
|
<!--</div>-->
|
|
|
|
<!--<div class="cl"></div>-->
|
|
|
|
<!--</div>-->
|
|
|
|
</div>
|
2015-09-22 17:18:10 +08:00
|
|
|
<ul class="wlist" style="margin-top: 10px;">
|
|
|
|
<%= pagination_links_full @reply_pages, @reply_count, :per_page_links => false,:flag=>true %>
|
|
|
|
</ul>
|
2015-09-18 17:44:16 +08:00
|
|
|
</div>
|