diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index 70ac952ea..85f57917b 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -37,6 +37,19 @@ class OrganizationsController < ApplicationController @organization = Organization.new render :layout => 'new_base' end + + def edit + @organization = Organization.find(params[:id]) + end + + def destroy + @organization = Organization.find(params[:id]) + @organization.destroy + respond_to do |format| + format.html{ redirect_to admin_organization_path } + end + end + def create @organization = Organization.new @organization.name = params[:organization][:name] diff --git a/app/views/organizations/destroy.js.erb b/app/views/organizations/destroy.js.erb new file mode 100644 index 000000000..e69de29bb diff --git a/app/views/organizations/edit.html.erb b/app/views/organizations/edit.html.erb new file mode 100644 index 000000000..c2e918708 --- /dev/null +++ b/app/views/organizations/edit.html.erb @@ -0,0 +1,108 @@ + +<% @nav_dispaly_organization_label = 1 + @nav_dispaly_forum_label = 1 %> +<%= error_messages_for 'organization' %> +
+

编辑组织

+
+
+ + + <%#= form_for( @organization,{:controller => 'organizations',:action => 'update',:id=>@organization,:html=>{:id=>'update_org_form',:method=>'put'}}) do %> + <%= labelled_form_for @organization, :html => {:id => "edit_organization_#{@organization.id}"} do |f|%> + <%= render :partial=>"new_org_avatar_form",:locals=> {source:@organization} %> + + +
组织名称: +
+
+
+
组织描述: +
+
+
+ + + + + + + + +
公开 : + class="ml3" /> +
+ 保存 + <% end %> +
+
+ +<% html_title(l(:label_organization_new)) -%> + + +