Fixing up the signin/signup pages

This commit is contained in:
Matt Barringer 2013-01-17 16:27:03 +01:00
parent 1d7670d74e
commit 1dddf00d96
13 changed files with 47 additions and 47 deletions

View file

@ -18,4 +18,4 @@
= f.input :password, :hint => "(Leave blank if you don't want to change it)", :input_html => {:autocomplete => "off"}
= f.input :password_confirmation, :input_html => {:autocomplete => "off"}
= f.input :current_password, :input_html => {:autocomplete => "off"}, :hint => "(we need your current password to confirm password or email changes)"
= f.submit "Update"
= f.action :submit, :as => :button, :label => "Update", :button_html => {:class => "btn btn-primary"}

View file

@ -0,0 +1,14 @@
.container
%h2.center-text
Sign Up
.row-fluid
.well.span3.offset2
= semantic_form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f|
= f.input :email
= f.input :password
= f.input :password_confirmation
= f.action :submit, :as => :button, :label => "Sign Up", :button_html => {:class => "btn btn-primary"}
.well.span3.offset2
%h4
Already have an account?
= render "devise/shared/links"

View file

@ -1,13 +1,15 @@
.container
%h2.center-text
Sign in
.row
.span6.offset3
Sign In
.row-fluid
.well.span3.offset2
= semantic_form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f|
= f.input :email
= f.input :password
- if devise_mapping.rememberable?
= f.input :remember_me, :as=> :boolean
= f.submit "Sign in"
= f.input :remember_me, :as=> :boolean, :label => false
= f.action :submit, :as => :button, :label => "Sign In", :button_html => {:class => "btn btn-primary"}
.well.span3.offset2
%h4
No account?
= render "devise/shared/links"

View file

@ -1,25 +0,0 @@
<%- if controller_name != 'sessions' %>
<%= link_to "Sign in", new_session_path(resource_name) %><br />
<% end -%>
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
<%= link_to "Sign up", new_registration_path(resource_name) %><br />
<% end -%>
<%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
<%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
<% end -%>
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
<%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
<% end -%>
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
<%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
<% end -%>
<%- if devise_mapping.omniauthable? %>
<%- resource_class.omniauth_providers.each do |provider| %>
<%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %><br />
<% end -%>
<% end -%>

View file

@ -0,0 +1,22 @@
- if controller_name != 'sessions'
= button_to "Sign In", new_session_path(resource_name), :method => :get, :class => "btn btn-primary", :style=> "margin-top: 5px"
- if devise_mapping.registerable? && controller_name != 'registrations'
= button_to "Sign Up", new_registration_path(resource_name), :method => :get, :class => "btn btn-primary", :style=> "margin-top: 5px"
- if devise_mapping.recoverable? && controller_name != 'passwords'
= link_to "Forgot your password?", new_password_path(resource_name)
%br
- if devise_mapping.confirmable? && controller_name != 'confirmations'
= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name)
%br
- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks'
= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name)
%br
- if devise_mapping.omniauthable?
- resource_class.omniauth_providers.each do |provider|
= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider)

View file

@ -20,10 +20,10 @@
%ul.nav.pull-right
- if user_signed_in?
%li
= link_to('Logout', destroy_user_session_path, :method=>'delete')
= link_to('Sign Out', destroy_user_session_path, :method=>'delete')
- else
%li
= link_to('Login', new_user_session_path)
= link_to('Sign In', new_user_session_path)
- if user_signed_in?
%li
= link_to('Edit account', edit_user_registration_path)

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.