Conflicts: app/views/blog_comments/show.html.erb app/views/courses/syllabus.html.erb app/views/messages/_org_subfield_show.html.erbhjq_dianming_api
commit
d820977d5d
@ -1,72 +1,77 @@
|
|||||||
<div class="resources mt10">
|
<div class="resources mt10">
|
||||||
<div class="homepagePostBrief">
|
<div class="homepagePostBrief">
|
||||||
|
|
||||||
<div class="homepagePostDes" style="width:690px;">
|
<div class="homepagePostDes" style="width:690px;">
|
||||||
<div class="homepagePostTitle postGrey"><%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id) %></div>
|
<div class="homepagePostTitle postGrey"><%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id) %></div>
|
||||||
<% unless document.content.blank? %>
|
<% unless document.content.blank? %>
|
||||||
<div class="homepagePostIntro" id="intro_content_<%= document.id%>">
|
<div class="homepagePostIntro" id="intro_content_<%= document.id%>">
|
||||||
<%= document.content.html_safe %>
|
<%= document.content.html_safe %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if params[:show_homepage].nil? %>
|
<% if params[:show_homepage].nil? %>
|
||||||
<div class="homepagePostDate" style="float:right;">
|
<div class="homepagePostDate" style="float:right;">
|
||||||
发布时间:<%= format_activity_day(document.created_at) %> <%= format_time(document.created_at, false) %>
|
发布时间:<%= format_activity_day(document.created_at) %> <%= format_time(document.created_at, false) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div class="homepagePostDate" style="float:right;">
|
<div class="homepagePostDate" style="float:right;">
|
||||||
最后编辑:<%= User.find(EditorOfDocument.where("org_document_comment_id =?", document.id).order("created_at desc").first.editor_id).realname %>
|
最后编辑:<%= User.find(EditorOfDocument.where("org_document_comment_id =?", document.id).order("created_at desc").first.editor_id).realname %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<!-- <%# if defined?(home_id) %>
|
<!-- <%# if defined?(home_id) %>
|
||||||
<div style="float:right;">最后编辑:<%#= User.find() %></div>
|
<div style="float:right;">最后编辑:<%#= User.find() %></div>
|
||||||
<%# end %>-->
|
<%# end %>-->
|
||||||
<% if User.current.admin? || User.current.admin_of_org?(Organization.find(document.organization_id)) || User.current.id == document.creator_id %>
|
<% if User.current.admin? || User.current.admin_of_org?(Organization.find(document.organization_id)) || User.current.id == document.creator_id %>
|
||||||
<div class="homepagePostSetting">
|
<div class="homepagePostSetting">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="homepagePostSettingIcon">
|
<li class="homepagePostSettingIcon">
|
||||||
<ul class="homepagePostSettiongText">
|
<ul class="homepagePostSettiongText">
|
||||||
<li>
|
<li>
|
||||||
<%= form_for('new_form', :url => {:controller => 'organizations', :action => 'cancel_homepage', :id => document.organization_id, :home_id => document.id}, :method => "put", :remote => true) do |f| %>
|
<%= form_for('new_form', :url => {:controller => 'organizations', :action => 'cancel_homepage', :id => document.organization_id, :home_id => document.id}, :method => "put", :remote => true) do |f| %>
|
||||||
<a href="javascript:void(0);" class="postOptionLink" onclick="$(this).parent().submit();">取消首页</a>
|
<a href="javascript:void(0);" class="postOptionLink" onclick="$(this).parent().submit();">取消首页</a>
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<%= link_to "编辑首页", edit_org_document_comment_path(:id => document.id, :organization_id => document.organization_id, :flag => 2), :class => "postOptionLink" %>
|
<%= link_to "编辑首页", edit_org_document_comment_path(:id => document.id, :organization_id => document.organization_id, :flag => 2), :class => "postOptionLink" %>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<%= link_to "删除首页", org_document_comment_path(:id => document.id, :organization_id => document.organization_id), :method => 'delete',
|
<%= link_to "删除首页", org_document_comment_path(:id => document.id, :organization_id => document.organization_id), :method => 'delete',
|
||||||
:data => {:confirm => l(:text_are_you_sure)},
|
:data => {:confirm => l(:text_are_you_sure)},
|
||||||
:remote => true, :class => 'postOptionLink' %>
|
:remote => true, :class => 'postOptionLink' %>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var postContent = $("#intro_content_<%= document.id%>").html();
|
$("#intro_content_<%= @document.id%> p,#intro_content_<%= @document.id%> span,#intro_content_<%= @document.id%> em").each(function(){
|
||||||
postContent = postContent.replace(/ /g," ");
|
var postContent = $(this).html();
|
||||||
$("#intro_content_<%= document.id%>").html(postContent);
|
postContent = postContent.replace(/ /g," ");
|
||||||
function expand_reply(container, btnid) {
|
postContent= postContent.replace(/ {2}/g," ");
|
||||||
var target = $(container);
|
postContent=postContent.replace(/ /g," ");
|
||||||
var btn = $(btnid);
|
postContent=postContent.replace(/ /g," ");
|
||||||
if (btn.data('init') == '0') {
|
$(this).html(postContent);
|
||||||
btn.data('init', 1);
|
});
|
||||||
btn.html('收起回复');
|
function expand_reply(container, btnid) {
|
||||||
target.show();
|
var target = $(container);
|
||||||
} else {
|
var btn = $(btnid);
|
||||||
btn.data('init', 0);
|
if (btn.data('init') == '0') {
|
||||||
btn.html('展开更多');
|
btn.data('init', 1);
|
||||||
target.hide();
|
btn.html('收起回复');
|
||||||
target.eq(0).show();
|
target.show();
|
||||||
target.eq(1).show();
|
} else {
|
||||||
target.eq(2).show();
|
btn.data('init', 0);
|
||||||
}
|
btn.html('展开更多');
|
||||||
}
|
target.hide();
|
||||||
|
target.eq(0).show();
|
||||||
|
target.eq(1).show();
|
||||||
|
target.eq(2).show();
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
@ -1,13 +1,18 @@
|
|||||||
<div class="homepagePostIntro break_word upload_img list_style maxh360 table_maxWidth lh18" id="activity_description_<%= user_activity_id%>">
|
<div class="homepagePostIntro break_word upload_img list_style maxh360 table_maxWidth lh18" id="activity_description_<%= user_activity_id%>">
|
||||||
<div id="intro_content_<%= user_activity_id%>">
|
<div id="intro_content_<%= user_activity_id%>">
|
||||||
<%= content.to_s.html_safe%>
|
<%= content.to_s.html_safe%>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function(){
|
$(function(){
|
||||||
var postContent = $("#intro_content_<%= user_activity_id%>").html();
|
$("#intro_content_<%= user_activity_id%> p,#intro_content_<%= user_activity_id%> span,#intro_content_<%= user_activity_id%> em").each(function(){
|
||||||
postContent = postContent.replace(/ /g," ");
|
var postContent = $(this).html();
|
||||||
$("#intro_content_<%= user_activity_id%>").html(postContent);
|
postContent = postContent.replace(/ /g," ");
|
||||||
description_show_hide(<%=user_activity_id %>);
|
postContent= postContent.replace(/ {2}/g," ");
|
||||||
});
|
postContent=postContent.replace(/ /g," ");
|
||||||
|
postContent=postContent.replace(/ /g," ");
|
||||||
|
$(this).html(postContent);
|
||||||
|
});
|
||||||
|
description_show_hide(<%=user_activity_id %>);
|
||||||
|
});
|
||||||
</script>
|
</script>
|
Loading…
Reference in new issue