编辑功能

beidou_tim
huang 9 years ago
parent 1d2e6327a8
commit d0db711449

@ -1,5 +1,5 @@
class SubDocumentCommentsController < ApplicationController class SubDocumentCommentsController < ApplicationController
before_filter :find_subdomain_and_subfield, :only => [:new, :create, :show, :index, :destroy] before_filter :find_subdomain_and_subfield, :only => [:new, :create, :show, :index, :destroy, :edit]
before_filter :find_subfield_content, :only => [:show, :index] before_filter :find_subfield_content, :only => [:show, :index]
helper :attachments,:organizations helper :attachments,:organizations
layout 'base_sub_domain' layout 'base_sub_domain'
@ -90,9 +90,8 @@ class SubDocumentCommentsController < ApplicationController
end end
def edit def edit
@org_document = SubDocumentComment.find(params[:id]) @sub_document = SubDocumentComment.find(params[:id])
@flag = params[:flag] @flag = params[:flag]
@organization = Organization.find(params[:organization_id])
end end
def add_reply def add_reply

@ -9,12 +9,12 @@
<%= link_to User.find(document.creator_id), user_url_in_org(document.creator.id), :class => "newsBlue mr15" %> <%= link_to User.find(document.creator_id), user_url_in_org(document.creator.id), :class => "newsBlue mr15" %>
TO&nbsp;&nbsp;<%= link_to @organization.name, organization_path(@organization), :class => "newsBlue" %> TO&nbsp;&nbsp;<%= link_to @organization.name, organization_path(@organization), :class => "newsBlue" %>
| |
<span style="color:#269ac9;"><%=link_to document.sub_domain.name, org_subfield_sub_domain_sub_document_comment_path(document, :org_subfield_id=> @org_subfield.id, :sub_domain_id => document.sub_domain.id), :class => "newsBlue" %></span> <span style="color:#269ac9;"><a class="newsBlue"><%= document.sub_domain.name %></a></span>
<%# if document.organization.home_id == document.id %> <%# if document.organization.home_id == document.id %>
<!--<span class="red_homework_btn_cir ml5">已设为首页</span>--> <!--<span class="red_homework_btn_cir ml5">已设为首页</span>-->
<%# end %> <%# end %>
</div> </div>
<div class="homepagePostTitle postGrey"><a><% document.title %></a></div> <div class="homepagePostTitle postGrey"><a><%= link_to document.title, org_subfield_sub_domain_sub_document_comment_path(document, :org_subfield_id=> @org_subfield.id, :sub_domain_id => document.sub_domain.id) %></a></div>
<div class="homepagePostDate fl"> <div class="homepagePostDate fl">
发布时间:<%= 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>
@ -46,7 +46,7 @@
<!--<%# end %>--> <!--<%# end %>-->
<!--</li>--> <!--</li>-->
<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" %> <%= 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 => flag), :method => 'update', :class => "postOptionLink" %>
</li> </li>
<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', <%= 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',

@ -126,9 +126,9 @@ RedmineApp::Application.routes.draw do
post 'reply' post 'reply'
post 'add_reply_in_doc' post 'add_reply_in_doc'
delete 'delete_reply' delete 'delete_reply'
get 'edit'
end end
collection do collection do
end end
end end

Loading…
Cancel
Save