帖子添加编辑删除功能
This commit is contained in:
parent
48002eb247
commit
a9059c4c2e
|
@ -90,7 +90,7 @@ class SubDocumentCommentsController < ApplicationController
|
|||
end
|
||||
|
||||
def edit
|
||||
@org_document = OrgDocumentComment.find(params[:id])
|
||||
@org_document = SubDocumentComment.find(params[:id])
|
||||
@flag = params[:flag]
|
||||
@organization = Organization.find(params[:organization_id])
|
||||
end
|
||||
|
|
|
@ -35,7 +35,30 @@
|
|||
<!-- <%# if defined?(home_id) %>
|
||||
<div style="float:right;">最后编辑:<%#= User.find() %></div>
|
||||
<%# end %>-->
|
||||
<!--编辑删除暂时隐藏
|
||||
<% if User.current.admin? || User.current.admin_of_org?(@organization) || User.current.id == document.creator_id %>
|
||||
<div class="homepagePostSetting">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<!--<li>-->
|
||||
<!--<%#= form_for('new_form', :url => {:controller => 'organizations', :action => 'set_homepage', :id => document.organization_id, :home_id => document.id, :show_homepage => 1}, :method => "put", :remote => true) do |f| %>-->
|
||||
<!--<a href="javascript:void(0);" class="postOptionLink" onclick="$(this).parent().submit();">设为首页</a>-->
|
||||
<!--<%# end %>-->
|
||||
<!--</li>-->
|
||||
<li>
|
||||
<%#= link_to "编辑文章", org_subfield_sub_domain_sub_document_comment_path(document, :org_subfield_id=> params[:org_subfield_id], :sub_domain_id => document.sub_domain.id, :flag => flag), :method => 'edit', :class => "postOptionLink" %>
|
||||
</li>
|
||||
<li>
|
||||
<%#= link_to "删除文章", org_subfield_sub_domain_sub_document_comment_path(document, :org_subfield_id=> params[:org_subfield_id], :sub_domain_id => document.sub_domain.id, :flag => flag), :method => 'delete',
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:remote => true, :class => 'postOptionLink' %>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
<!--over-->
|
||||
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue