From 76db95aa0339b85ad7fd168e9d89c45ed3996162 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Mon, 7 Dec 2015 15:52:13 +0800 Subject: [PATCH] =?UTF-8?q?1.=E7=BB=84=E7=BB=87=E9=A1=B5=E9=9D=A2=E4=B8=AD?= =?UTF-8?q?=EF=BC=8C=E9=80=80=E5=87=BA=E5=90=8E=E5=88=B7=E6=96=B0=E7=BB=84?= =?UTF-8?q?=E7=BB=87=E9=A1=B5=E9=9D=A2=EF=BC=9B=202.=E7=BB=84=E7=BB=87?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=B8=AD=EF=BC=8C=E7=82=B9=E5=87=BB=E2=80=9C?= =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5=E2=80=9D=EF=BC=8C=E6=89=93?= =?UTF-8?q?=E5=BC=80=E6=96=B0=E7=9A=84=E9=A1=B5=E9=9D=A2=EF=BC=9B=203.?= =?UTF-8?q?=E7=BB=84=E7=BB=87=E9=A1=B5=E9=9D=A2=E9=A1=B5=E9=A6=96=E9=83=A8?= =?UTF-8?q?=E5=88=86=EF=BC=8C=E7=94=A8=E6=88=B7=E5=90=8D=E4=B8=8D=E9=93=BE?= =?UTF-8?q?=E6=8E=A5=E7=94=A8=E6=88=B7=E9=A1=B5=E9=9D=A2=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/organizations_controller.rb | 7 +++++++ app/views/layouts/base_org.html.erb | 7 ++++--- config/routes.rb | 1 + 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index 85f57917b..d182640ed 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -239,6 +239,13 @@ class OrganizationsController < ApplicationController end end + def logout + logout_user + respond_to do |format| + format.html {redirect_to organization_path(params[:id])} + end + end + def search_projects @organization = Organization.find(params[:id]) condition = '%%' diff --git a/app/views/layouts/base_org.html.erb b/app/views/layouts/base_org.html.erb index 5af5c9ad0..4c33dcca5 100644 --- a/app/views/layouts/base_org.html.erb +++ b/app/views/layouts/base_org.html.erb @@ -46,12 +46,13 @@ - + <% else %> diff --git a/config/routes.rb b/config/routes.rb index 4e64ca505..15e41955d 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -46,6 +46,7 @@ RedmineApp::Application.routes.draw do get 'search_projects' post 'join_project_menu' post 'join_projects' + post 'logout' end collection do get 'check_uniq'