Merge origin/release/6.1 into dev [ci skip]

pull/6827/head
Oliver Günther 8 years ago
commit 8cc6d2f0a2
No known key found for this signature in database
GPG Key ID: 88872239EB414F99
  1. 34
      app/assets/stylesheets/auth_plugins/auth_plugins.css
  2. 9
      app/views/hooks/login/_providers.html.erb
  3. 2
      lib/open_project/auth_plugins/engine.rb

@ -0,0 +1,34 @@
/* -- copyright
// OpenProject My Project Page Plugin
//
// Copyright (C) 2011-2015 the OpenProject Foundation (OPF)
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License version 3.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
// See doc/COPYRIGHT.md for more details.
*/
/*
// Defined by Google
// see: https://developers.google.com/identity/branding-guidelines
// !important is necessary to overwrite the default styling options
*/
#top-menu #nav-login-content .login-auth-providers a.auth-provider.auth-provider-google,
#content .login-auth-providers a.auth-provider-google,
.modal-wrapper .login-auth-providers a.auth-provider-google {
padding: 8px 8px 8px 50px;
background-position-x: 8px;
background-size: 18px 18px;
background-color: #FFF;
background-image: url('/assets/openid_connect/auth_provider-google.png');
}

@ -27,6 +27,8 @@ See doc/COPYRIGHT.rdoc for more details.
++#%>
<%= stylesheet_link_tag 'auth_plugins/auth_plugins' %>
<% OpenProject::Plugins::AuthPlugin.providers.each do |pro| %>
<%
opts = {
@ -37,14 +39,17 @@ See doc/COPYRIGHT.rdoc for more details.
opts[:origin] = params['back_url']
end
%>
<a href="<%= url_for opts %>" class="auth-provider auth-provider-<%= pro[:name] %>">
<a href="<%= url_for opts %>" class="auth-provider auth-provider-<%= pro[:name] %> button">
<style type="text/css" scoped="scoped">
<% if pro[:icon] %>
#content .login-auth-providers a.auth-provider.auth-provider-<%= pro[:name] %> {
background-image: url('<%= image_path(pro[:icon]) %>');
}
#top-menu #nav-login-content .login-auth-providers a.auth-provider.auth-provider-<%= pro[:name] %> {
background-image: url('<%= image_path(pro[:icon]) %>');
background-image: url('<%= image_path(pro[:icon]) %>') ;
}
.modal-wrapper .login-auth-providers a.auth-provider.auth-provider-<%= pro[:name] %> {
background-image: url('<%= image_path(pro[:icon]) %>') ;
}
<% end %>
</style>

@ -42,5 +42,7 @@ module OpenProject::AuthPlugins
initializer 'auth_plugins.register_hooks' do
require 'open_project/auth_plugins/hooks'
end
assets %w(auth_plugins/auth_plugins.css)
end
end

Loading…
Cancel
Save