1.登陆退出使用www;2.对于有多个标签的组织资源,过滤条件中的“其他”应该显示

This commit is contained in:
ouyangxuhua 2016-03-14 15:39:45 +08:00
parent 7d2bb572b2
commit a2e6f0ee5f
4 changed files with 13 additions and 5 deletions

View File

@ -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?

View File

@ -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

View File

@ -100,7 +100,7 @@
</li>
<!--<li><a href="javascript:void(0);" class="menuGrey">账号设置</a> </li>-->
<li>
<%= link_to "退出",signout_path,:class => "menuGrey",:method => "post"%>
<%= link_to "退出",logout_url_without_domain,:class => "menuGrey",:method => "post"%>
</li>
</ul>
</li>

View File

@ -46,7 +46,7 @@
<li class="navOrgMenu fr" id="orgUser" style="cursor:pointer;">
<%= link_to image_tag(url_to_avatar(User.current),:width => '23',:height => '23'), request.local? ? user_path(User.current):("https://www.trustie.net/users/" + User.current.id.to_s),:alt => '用户头像', :target => '_blank',:style=>'border-radius:3px; vertical-align:top; margin-top:3px; display:inline-block; margin-right:3px;' %>
<%= link_to User.current, (request.local? || request.subdomain.blank?) ? user_path(User.current):("https://www.trustie.net/users/" + User.current.id.to_s),:id => "orgUserName",:class => 'fontGrey2 f14 mr5',:target => '_blank' %>
<%= link_to "退出",(request.local? || request.subdomain.blank?) ? signout_path():"https://www.trustie.net/logout", :class =>"menuGrey", :method => 'post', :rel => "nofollow" %>
<%= link_to "退出",logout_url_without_domain, :class =>"menuGrey", :method => 'post', :rel => "nofollow" %>
</li>
<!--<li class="navOrgMenu fr"><%#=link_to User.current, user_path(User.current), :class => "linkGrey8 f14" %></li>-->
<% else %>