帖子详情页面添加编辑功能
This commit is contained in:
parent
a5be092c16
commit
ae298f9b55
|
@ -84,11 +84,7 @@ class SubDocumentCommentsController < ApplicationController
|
|||
# render :layout => @organization.switch_type ? 'base_sub_domain' : 'base_org'
|
||||
# redirect_to organization_path(@organization)
|
||||
else
|
||||
# if params[:flag].to_i == 1
|
||||
# redirect_to org_document_comment_path(@org_document.root.id, :organization_id => @org_document.organization.id)
|
||||
# else
|
||||
# redirect_to organization_path(@org_document.organization.id, :org_subfield_id => params[:org_subfield_id])
|
||||
# end
|
||||
redirect_to org_subfield_sub_domain_sub_document_comment_path(:org_subfield_id => params[:org_subfield_id], :sub_domain_id => params[:sub_domain_id])
|
||||
end
|
||||
}
|
||||
end
|
||||
|
|
|
@ -44,16 +44,16 @@
|
|||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<!--<li>-->
|
||||
<!--<!–<%#= form_for('new_form', :url => {:controller => 'sub_document_comments', :action => 'set_homepage', :id => @organization.id, :home_id => @document.id}, :method => "put", :remote => true) do |f| %>–>-->
|
||||
<!--<!–<a href="javascript:void(0);" class="postOptionLink" onclick="$(this).parent().submit();">设为首页</a>–>-->
|
||||
<!--<!–<%# end %>–>-->
|
||||
<!--</li>-->
|
||||
<li>
|
||||
<%= form_for('new_form', :url => {:controller => 'organizations', :action => 'set_homepage', :id => @organization.id, :home_id => @document.id}, :method => "put", :remote => true) do |f| %>
|
||||
<a href="javascript:void(0);" class="postOptionLink" onclick="$(this).parent().submit();">设为首页</a>
|
||||
<% end %>
|
||||
<%= link_to "编辑文章", edit_org_subfield_sub_domain_sub_document_comment_path(@document, :org_subfield_id=> params[:org_subfield_id], :sub_domain_id => @document.sub_domain.id, :flag => 1), :class => "postOptionLink" %>
|
||||
</li>
|
||||
<li>
|
||||
<%#= link_to "编辑文章", edit_org_document_comment_path(:id => @document.id, :organization_id => @organization.id, :flag => 1), :class => "postOptionLink" %>
|
||||
</li>
|
||||
<li>
|
||||
<%#= link_to "删除文章", org_document_comment_path(:id => @document.id, :organization_id => @organization.id, :detail_page => 1), :method => 'delete',
|
||||
<%= link_to "删除文章", org_document_comment_path(:id => @document.id, :organization_id => @organization.id, :detail_page => 1), :method => 'delete',
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:remote => true, :class => 'postOptionLink' %>
|
||||
</li>
|
||||
|
@ -83,13 +83,13 @@
|
|||
</div>
|
||||
<% if count > 3 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%= document.id %>" onclick="expand_reply('#reply_div_<%= document.id %> li','#reply_btn_<%=document.id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help">
|
||||
<a id="reply_btn_<%= @document.id %>" onclick="expand_reply('#reply_sub_div_<%= @document.id %> li','#reply_btn_<%= @document.id %>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help">
|
||||
展开更多
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="" id="reply_div_<%= @document.id %>">
|
||||
<div class="" id="reply_sub_div_<%= @document.id %>">
|
||||
<% comments_for_doc.each_with_index do |reply,i| %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
|
|
Loading…
Reference in New Issue