Commit b211da433f03c0840a2e177b5b4df54f60ee91f1
Committed by
Vasiliy Ermolovich
1 parent
0d4313df
Exists in
master
and in
1 other branch
style github auth link
Showing
4 changed files
with
8 additions
and
4 deletions
Show diff stats
app/views/devise/sessions/new.html.haml
| @@ -2,7 +2,9 @@ | @@ -2,7 +2,9 @@ | ||
| 2 | - auth_key = Devise.authentication_keys.first | 2 | - auth_key = Devise.authentication_keys.first |
| 3 | 3 | ||
| 4 | - if Errbit::Config.github_authentication | 4 | - if Errbit::Config.github_authentication |
| 5 | - = link_to "Sign in with Github", user_omniauth_authorize_path(:github) | 5 | + - content_for :action_bar do |
| 6 | + %div.action-bar | ||
| 7 | + %span.github= link_to "Sign in with GitHub", user_omniauth_authorize_path(:github), :style => 'background: url(/images/github.png) no-repeat 5px 5px' | ||
| 6 | 8 | ||
| 7 | = form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| | 9 | = form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| |
| 8 | .required | 10 | .required |
1.94 KB
public/stylesheets/application.css
| @@ -829,4 +829,6 @@ table.errs tr td.message .inline_comment em.commenter { | @@ -829,4 +829,6 @@ table.errs tr td.message .inline_comment em.commenter { | ||
| 829 | } | 829 | } |
| 830 | 830 | ||
| 831 | .current.asc:after { content: ' ↑'; } | 831 | .current.asc:after { content: ' ↑'; } |
| 832 | -.current.desc:after { content: ' ↓'; } | ||
| 833 | \ No newline at end of file | 832 | \ No newline at end of file |
| 833 | +.current.desc:after { content: ' ↓'; } | ||
| 834 | + | ||
| 835 | +span.github a { background: url(../images/github.png) no-repeat 5px 5px; } |
spec/acceptance/login_spec.rb
| @@ -6,9 +6,9 @@ feature 'Log in' do | @@ -6,9 +6,9 @@ feature 'Log in' do | ||
| 6 | Fabricate(:user, :github_login => 'nashby') | 6 | Fabricate(:user, :github_login => 'nashby') |
| 7 | end | 7 | end |
| 8 | 8 | ||
| 9 | - scenario 'log in via Github' do | 9 | + scenario 'log in via GitHub' do |
| 10 | visit '/' | 10 | visit '/' |
| 11 | - click_link 'Sign in with Github' | 11 | + click_link 'Sign in with GitHub' |
| 12 | page.should have_content 'Successfully authorized from Github account' | 12 | page.should have_content 'Successfully authorized from Github account' |
| 13 | end | 13 | end |
| 14 | end | 14 | end |