2016-02-02 11:23:17 +08:00
|
|
|
<%= content_for(:header_tags) do %>
|
2016-07-20 17:00:18 +08:00
|
|
|
<%= import_ke(enable_at: false, prettify: false, init_activity: true) %>
|
2016-02-02 11:23:17 +08:00
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(function(){
|
|
|
|
$("#RSide").removeAttr("id");
|
|
|
|
$("#Container").css("width","1000px");
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
<script>
|
|
|
|
$(function() {
|
2016-07-20 17:00:18 +08:00
|
|
|
sd_create_editor_from_data(<%= @news.id%>,null,"100%", "<%=@news.class.to_s%>");
|
2016-02-02 11:23:17 +08:00
|
|
|
showNormalImage('message_description_<%= @news.id %>');
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<div class="postRightContainer ml10" onmouseover="$('#message_setting_<%= @news.id%>').show();" onmouseout="$('#message_setting_<%= @news.id%>').hide();">
|
|
|
|
<div class="postThemeContainer">
|
|
|
|
<div class="postDetailPortrait">
|
|
|
|
<%= link_to image_tag(url_to_avatar(@news.author),:width=>50,:height => 50,:alt=>'图像' ),user_path(@news.author) %>
|
|
|
|
</div>
|
|
|
|
<div class="postThemeWrap">
|
|
|
|
<% if User.current.logged? %>
|
|
|
|
<div class="homepagePostSetting" id="message_setting_<%= @news.id%>" style="display: none">
|
|
|
|
<ul>
|
|
|
|
<li class="homepagePostSettingIcon">
|
|
|
|
<ul class="homepagePostSettiongText">
|
|
|
|
<li><%= link_to("发送", 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send('#{@news.id}','#{User.current.id}','news')") %></li>
|
|
|
|
<li>
|
|
|
|
<%= link_to(
|
|
|
|
l(:button_edit),
|
|
|
|
{:action => 'edit', :id => @news},
|
|
|
|
:class => 'postOptionLink'
|
|
|
|
) if @news.author == User.current %>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<%= delete_link(
|
|
|
|
news_path(@news),
|
|
|
|
:data => {:confirm => l(:text_are_you_sure)},
|
|
|
|
:class => 'postOptionLink'
|
|
|
|
) if @news.author == User.current %>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<%end%>
|
|
|
|
<div class="postDetailTitle fl">
|
|
|
|
<a href="javascript:void(0);" class="f14 linkGrey4 fb" style="overflow:hidden;">通知: <%= @news.title%></a>
|
|
|
|
</div>
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
|
|
|
<div class="postDetailCreater">
|
|
|
|
<% if @news.try(:author).try(:realname) == ' ' %>
|
|
|
|
<%= link_to @news.try(:author), user_path(@news.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
|
|
|
|
<% else %>
|
|
|
|
<%= link_to @news.try(:author).try(:realname), user_path(@news.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<div class="postDetailDate mb5"><%= format_time( @news.created_on)%></div>
|
|
|
|
<div class="cl"></div>
|
|
|
|
<div class="homepagePostIntro memo-content upload_img break_word" id="message_description_<%= @news.id %>" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" >
|
|
|
|
<%= @news.description.html_safe%>
|
|
|
|
</div>
|
|
|
|
<div class="cl"></div>
|
|
|
|
<div class="mt10" style="font-weight:normal;">
|
|
|
|
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @news} %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="cl"></div>
|
|
|
|
</div>
|
|
|
|
<div class="cl"></div>
|
|
|
|
<div class="homepagePostReply">
|
2016-07-20 17:00:18 +08:00
|
|
|
<%= render :partial => 'news/news_all_replies' %>
|
2016-02-02 11:23:17 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(function(){
|
2016-05-13 10:56:48 +08:00
|
|
|
$("#news_submit_comment").one('click',function(){
|
|
|
|
submitComment();
|
|
|
|
});
|
2016-02-02 11:23:17 +08:00
|
|
|
$("#message_description_<%= @news.id %> p,#message_description_<%= @news.id %> span,#message_description_<%= @news.id %> em").each(function(){
|
|
|
|
var postContent = $(this).html();
|
|
|
|
postContent = postContent.replace(/ /g," ");
|
|
|
|
postContent= postContent.replace(/ {2}/g," ");
|
|
|
|
postContent=postContent.replace(/ /g," ");
|
|
|
|
postContent=postContent.replace(/ /g," ");
|
|
|
|
$(this).html(postContent);
|
|
|
|
});
|
2016-05-20 15:30:25 +08:00
|
|
|
autoUrl('message_description_<%= @news.id %>');
|
2016-02-02 11:23:17 +08:00
|
|
|
});
|
|
|
|
</script>
|