diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index b288629c8..b6ac99f11 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -854,9 +854,7 @@ class FilesController < ApplicationController @result = visable_attachemnts @result if params[:other] @result = @result.select{|attachment| - attachment.tag_list.exclude?('软件') && - attachment.tag_list.exclude?('媒体') && - attachment.tag_list.exclude?('代码') + attachment.tag_list.index{|tag|tag != '软件' and tag != '媒体' and tag != '代码'}.present? } else @result = @result.select{|attachment| attachment.tag_list.include?(@tag_name)} unless @tag_name.blank? diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 477e18f41..31decde59 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -2951,3 +2951,13 @@ def user_url_in_org(user_id) return "https://www.trustie.net/users/" + user_id.to_s end end + +def logout_url_without_domain + if Rails.env.development? + return "http://localhost:3000/logout" + elsif Rails.env.test? + return "https://test.forge.trustie.net/logout" + else + return "https://www.trustie.net/logout" + end +end diff --git a/app/views/layouts/_logined_header.html.erb b/app/views/layouts/_logined_header.html.erb index 20239262f..8ab1851e4 100644 --- a/app/views/layouts/_logined_header.html.erb +++ b/app/views/layouts/_logined_header.html.erb @@ -100,7 +100,7 @@
  • - <%= link_to "退出",signout_path,:class => "menuGrey",:method => "post"%> + <%= link_to "退出",logout_url_without_domain,:class => "menuGrey",:method => "post"%>
  • diff --git a/app/views/layouts/base_org.html.erb b/app/views/layouts/base_org.html.erb index 201e63a5d..4a8e00c96 100644 --- a/app/views/layouts/base_org.html.erb +++ b/app/views/layouts/base_org.html.erb @@ -46,7 +46,7 @@ <% else %>