Skip to content

Commit

Permalink
Reworking a couple more devise views
Browse files Browse the repository at this point in the history
  • Loading branch information
nerakdon committed May 12, 2015
1 parent 1bfecd6 commit 1ae5f7e
Show file tree
Hide file tree
Showing 5 changed files with 402 additions and 0 deletions.
14 changes: 14 additions & 0 deletions app/views/devise/shared/_links.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
= nav_list class: 'nav-stacked nav-pills' do
- if controller_name != 'sessions'
= nav_item :sign_in.l, new_session_path(resource_name)
- if devise_mapping.registerable? && controller_name != 'registrations'
= nav_item :sign_up.l, new_registration_path(resource_name)
- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations'
= nav_item :forgot_your_password.l, new_password_path(resource_name)
- if devise_mapping.confirmable? && controller_name != 'confirmations'
= nav_item :didnt_receive_confirmation_instructions.l, new_confirmation_path(resource_name)
- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks'
= nav_item :didnt_receive_unlock_instructions.l, new_unlock_path(resource_name)
- if devise_mapping.omniauthable?
- resource_class.omniauth_providers.each do |provider|
= nav_item :sign_in_with_provider.l(provider: provider), omniauth_authorize_path(resource_name, provider)
14 changes: 14 additions & 0 deletions app/views/devise/unlocks/new.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
- add_title :resend_unlock_instructions.l
= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f|
= devise_error_messages!
.form-group
= f.label :email, class: 'col-sm-2 control-label'
.col-sm-2
= f.email_field :email, autofocus: true, class: 'col-sm-offset-2 form-control'
.form-group
.col-sm-2
.col-sm-2
.col-sm-offset-2
= f.submit :resend_unlock_instructions.l
- add_widget do
= render "devise/shared/links"
4 changes: 4 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ en:
cvc: 'CVC'
default_currency: 'usd'
default_interval: 'life'
didnt_receive_confirmation_instructions: "Didn't receive confirmation instructions?"
didnt_receive_unlock_instructions: "Didn't receive unlock instructions?"
edit_resource: "Edit %{resource}"
enter_new_card: 'Enter New Card'
error: "Error"
Expand All @@ -47,8 +49,10 @@ en:
paid_thru: "Paid Thru"
pricing: "Pricing"
resend_confirmation_instructions: 'Resend confirmation instructions'
resend_unlock_instructions: 'Resend unlock instructions'
send_me_reset_password_instructions: "Send me reset password instructions"
sign_in: "Sign In"
sign_in_with_provider: "Sign in with %{provider}"
sign_out: "Sign Out"
sign_up: "Sign Up"
status: "Status"
Expand Down
Binary file modified spec/dummy/db/development.sqlite3
Binary file not shown.

0 comments on commit 1ae5f7e

Please sign in to comment.