Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop

This commit is contained in:
huang 2016-03-14 18:31:09 +08:00
commit 3bfaddc80f
2 changed files with 22 additions and 2 deletions

View File

@ -2961,3 +2961,23 @@ def logout_url_without_domain
return "https://www.trustie.net/logout"
end
end
def signin_url_without_domain
if Rails.env.development?
return "http://localhost:3000/login?login=true"
elsif Rails.env.test?
return "https://test.forge.trustie.net/login?login=true"
else
return "https://www.trustie.net/login?login=true"
end
end
def register_url_without_domain
if Rails.env.development?
return "http://localhost:3000/login?login=false"
elsif Rails.env.test?
return "https://test.forge.trustie.net/login?login=false"
else
return "https://www.trustie.net/login?login=false"
end
end

View File

@ -77,10 +77,10 @@
</div>
<div id="loginInButton" class="fr ml20">
<a href="<%= (request.local? || request.subdomain.blank?) ? signin_path(:login=>true):'https://www.trustie.net/login?login=true' %>" class="c_white db">登录</a>
<a href="<%= signin_url_without_domain %>" class="c_white db">登录</a>
</div>
<div id="loginSignButton" class="fr">
<a href="<%= (request.local? || request.subdomain.blank?) ? signin_path(:login=>false):'https://www.trustie.net/login?login=false' %>" class="c_white db">注册</a>
<a href="<%= register_url_without_domain %>" class="c_white db">注册</a>
</div>
</div>