devise-bootstrap-views 0.0.11 → 1.0.0.alpha1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +10 -21
  3. data/README.md +6 -22
  4. data/Rakefile +1 -2
  5. data/app/assets/stylesheets/devise_bootstrap_views.scss +0 -10
  6. data/app/assets/stylesheets/devise_bootstrap_views_less.less +0 -10
  7. data/app/views/devise/confirmations/new.html.erb +16 -0
  8. data/app/views/{erb → devise}/mailer/confirmation_instructions.html.erb +4 -2
  9. data/app/views/{erb → devise}/mailer/reset_password_instructions.html.erb +1 -0
  10. data/app/views/{erb → devise}/mailer/unlock_instructions.html.erb +0 -0
  11. data/app/views/devise/passwords/edit.html.erb +23 -0
  12. data/app/views/devise/passwords/new.html.erb +16 -0
  13. data/app/views/devise/registrations/edit.html.erb +30 -0
  14. data/app/views/devise/registrations/new.html.erb +24 -0
  15. data/app/views/devise/sessions/new.html.erb +28 -0
  16. data/app/views/devise/shared/_links.html.erb +27 -0
  17. data/app/views/devise/unlocks/new.html.erb +16 -0
  18. data/devise-bootstrap-views.gemspec +10 -10
  19. data/lib/devise-bootstrap-views.rb +1 -4
  20. data/lib/devise_bootstrap_views_helper.rb +11 -9
  21. data/lib/generators/devise/views/bootstrap_templates/bootstrap_templates_generator.rb +2 -1
  22. data/lib/generators/devise/views/locale/locale_generator.rb +3 -4
  23. data/lib/version.rb +1 -1
  24. data/locales/pt.yml +1 -1
  25. data/locales/sl.yml +49 -55
  26. metadata +23 -47
  27. data/app/views/erb/confirmations/new.html.erb +0 -18
  28. data/app/views/erb/passwords/edit.html.erb +0 -24
  29. data/app/views/erb/passwords/new.html.erb +0 -17
  30. data/app/views/erb/registrations/edit.html.erb +0 -31
  31. data/app/views/erb/registrations/new.html.erb +0 -24
  32. data/app/views/erb/sessions/new.html.erb +0 -26
  33. data/app/views/erb/shared/_links.html.erb +0 -25
  34. data/app/views/erb/unlocks/new.html.erb +0 -16
  35. data/app/views/haml/confirmations/new.html.haml +0 -11
  36. data/app/views/haml/mailer/confirmation_instructions.html.haml +0 -4
  37. data/app/views/haml/mailer/reset_password_instructions.html.haml +0 -5
  38. data/app/views/haml/mailer/unlock_instructions.html.haml +0 -4
  39. data/app/views/haml/passwords/edit.html.haml +0 -15
  40. data/app/views/haml/passwords/new.html.haml +0 -11
  41. data/app/views/haml/registrations/edit.html.haml +0 -27
  42. data/app/views/haml/registrations/new.html.haml +0 -17
  43. data/app/views/haml/sessions/new.html.haml +0 -18
  44. data/app/views/haml/shared/_links.html.haml +0 -19
  45. data/app/views/haml/unlocks/new.html.haml +0 -11
  46. data/app/views/slim/confirmations/new.html.slim +0 -12
  47. data/app/views/slim/mailer/confirmation_instructions.html.slim +0 -7
  48. data/app/views/slim/mailer/reset_password_instructions.html.slim +0 -10
  49. data/app/views/slim/mailer/unlock_instructions.html.slim +0 -8
  50. data/app/views/slim/passwords/edit.html.slim +0 -16
  51. data/app/views/slim/passwords/new.html.slim +0 -12
  52. data/app/views/slim/registrations/edit.html.slim +0 -34
  53. data/app/views/slim/registrations/new.html.slim +0 -18
  54. data/app/views/slim/sessions/new.html.slim +0 -19
  55. data/app/views/slim/shared/_links.html.slim +0 -19
  56. data/app/views/slim/unlocks/new.html.slim +0 -12
  57. data/lib/generators/devise/views/bootstrap_haml_templates/bootstrap_haml_templates_generator.rb +0 -10
  58. data/lib/generators/devise/views/bootstrap_slim_templates/bootstrap_slim_templates_generator.rb +0 -10
@@ -1,16 +0,0 @@
1
- <%= bootstrap_devise_error_messages! %>
2
- <div class="panel panel-default devise-bs">
3
- <div class="panel-heading">
4
- <h4><%= t('.resend_unlock_instructions', default: 'Resend unlock instructions') %></h4>
5
- </div>
6
- <div class="panel-body">
7
- <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post, html: { role: "form" } }) do |f| %>
8
- <div class="form-group">
9
- <%= f.label :email %>
10
- <%= f.email_field :email, autofocus: true, class: 'form-control' %>
11
- </div>
12
- <%= f.submit t('.resend_unlock_instructions', default: 'Resend unlock instructions'), class: 'btn btn-primary'%>
13
- <% end %>
14
- </div>
15
- </div>
16
- <%= render 'devise/shared/links' %>
@@ -1,11 +0,0 @@
1
- = bootstrap_devise_error_messages!
2
- .panel.panel-default.devise-bs
3
- .panel-heading
4
- %h4= t('.resend_confirmation_instructions', default: 'Resend confirmation instructions')
5
- .panel-body
6
- = form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post, role: 'form' }) do |f|
7
- .form-group
8
- = f.label :email
9
- = f.email_field :email, autofocus: true, class: "form-control"
10
- = f.submit t('.resend_confirmation_instructions', default: 'Resend confirmation instructions'), class: 'btn btn-primary'
11
- = render 'devise/shared/links'
@@ -1,4 +0,0 @@
1
- %p= t('.greeting', recipient: @resource.email, default: "Welcome #{@resource.email}!")
2
- %p= t('.instruction', default: 'You can confirm your account email through the link below:')
3
- %p= link_to t('.action', default: 'Confirm my account'), |
4
- confirmation_url(@resource, confirmation_token: @token, locale: I18n.locale) |
@@ -1,5 +0,0 @@
1
- %p= t('.greeting', recipient: @resource.email, default: "Hello #{@resource.email}!")
2
- %p= t('.instruction', default: 'Someone has requested a link to change your password, and you can do this through the link below.')
3
- %p= link_to t('.action', default: 'Change my password'), edit_password_url(@resource, reset_password_token: @token, locale: I18n.locale)
4
- %p= t('.instruction_2', default: "If you didn't request this, please ignore this email.")
5
- %p= t('.instruction_3', default: "Your password won't change until you access the link above and create a new one.")
@@ -1,4 +0,0 @@
1
- %p= t('.greeting', recipient: @resource.email, default: "Hello #{@resource.email}!")
2
- %p= t('.message', default: 'Your account has been locked due to an excessive amount of unsuccessful sign in attempts.')
3
- %p= t('.instruction', default: 'Click the link below to unlock your account:')
4
- %p= link_to t('.action', default: 'Unlock my account'), unlock_url(@resource, unlock_token: @resource.unlock_token, locale: I18n.locale)
@@ -1,15 +0,0 @@
1
- = bootstrap_devise_error_messages!
2
- .panel.panel-default.devise-bs
3
- .panel-heading
4
- %h4= t('.change_your_password', default: 'Change your password')
5
- .panel-body
6
- = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put, role: 'form' }) do |f|
7
- = f.hidden_field :reset_password_token
8
- .form-group
9
- = f.label :password, t('.new_password', default: 'New password')
10
- = f.password_field :password, autofocus: true, class: 'form-control'
11
- .form-group
12
- = f.label :password_confirmation, t('.confirm_new_password', default: 'Confirm new password')
13
- = f.password_field :password_confirmation, class: 'form-control'
14
- = f.submit t('.change_my_password', default: 'Change my password'), class: 'btn btn-primary'
15
- = render 'devise/shared/links'
@@ -1,11 +0,0 @@
1
- = bootstrap_devise_error_messages!
2
- .panel.panel-default.devise-bs
3
- .panel-heading
4
- %h4= t('.forgot_your_password', default: 'Forgot your password?')
5
- .panel-body
6
- = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post, role: "form" }) do |f|
7
- .form-group
8
- = f.label :email
9
- = f.email_field :email, autofocus: true, class: 'form-control'
10
- = f.submit t('.send_me_reset_password_instructions', default: 'Send me reset password instructions'), class: 'btn btn-primary'
11
- = render 'devise/shared/links'
@@ -1,27 +0,0 @@
1
- = bootstrap_devise_error_messages!
2
- .panel.panel-default.devise-bs
3
- .panel-heading
4
- %h4= t('.title', resource: resource_class.model_name.human , default: "Edit #{resource_name.to_s.humanize}")
5
- .panel-body
6
- = form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f|
7
- .form-group
8
- = f.label :email
9
- = f.email_field :email, autofocus: true, class: 'form-control'
10
- .form-group
11
- = f.label :password
12
- %i
13
- (#{t('.leave_blank_if_you_don_t_want_to_change_it', default: "leave blank if you don't want to change it")})
14
- = f.password_field :password, autocomplete: "off", class: 'form-control'
15
- .form-group
16
- = f.label :password_confirmation
17
- = f.password_field :password_confirmation, class: 'form-control'
18
- .form-group
19
- = f.label :current_password
20
- %i
21
- (#{t('.we_need_your_current_password_to_confirm_your_changes', default: 'we need your current password to confirm your changes')})
22
- = f.password_field :current_password, class: 'form-control'
23
- = f.submit t('.update', default: 'Update'), class: 'btn btn-primary'
24
- %p
25
- = t('.unhappy', default: 'Unhappy')
26
- ? #{link_to t('.cancel_my_account', default: 'Cancel my account'), registration_path(resource_name), data: { confirm: t('.are_you_sure', default: "Are you sure?") }, method: :delete}.
27
- = link_to t('.back', default: 'Back'), :back
@@ -1,17 +0,0 @@
1
- = bootstrap_devise_error_messages!
2
- .panel.panel-default.devise-bs
3
- .panel-heading
4
- %h4= t('.sign_up', default: 'Sign up')
5
- .panel-body
6
- = form_for(resource, as: resource_name, url: registration_path(resource_name), html: { role: 'form' }) do |f|
7
- .form-group
8
- = f.label :email
9
- = f.email_field :email, autofocus: true, class: 'form-control'
10
- .form-group
11
- = f.label :password
12
- = f.password_field :password, class: 'form-control'
13
- .form-group
14
- = f.label :password_confirmation
15
- = f.password_field :password_confirmation, class: 'form-control'
16
- = f.submit t('.sign_up', default: 'Sign up'), class: 'btn btn-primary'
17
- = render 'devise/shared/links'
@@ -1,18 +0,0 @@
1
- .panel.panel-default.devise-bs
2
- .panel-heading
3
- %h4= t('.sign_in', default: 'Sign in')
4
- .panel-body
5
- = form_for(resource, as: resource_name, url: session_path(resource_name), html: { role: 'form' }) do |f|
6
- .form-group
7
- = f.label :email
8
- = f.email_field :email, autofocus: true, class: 'form-control'
9
- .form-group
10
- = f.label :password
11
- = f.password_field :password, autocomplete: 'off', class: 'form-control'
12
- - if devise_mapping.rememberable?
13
- .checkbox
14
- = f.label :remember_me do
15
- = f.check_box :remember_me
16
- = t('.remember_me', default: 'Remember me')
17
- = f.submit t('.sign_in', default: 'Sign in'), class: 'btn btn-primary'
18
- = render 'devise/shared/links'
@@ -1,19 +0,0 @@
1
- - if controller_name != 'sessions'
2
- = link_to t('.sign_in', default: 'Sign in'), new_session_path(resource_name)
3
- %br/
4
- - if devise_mapping.registerable? && controller_name != 'registrations'
5
- = link_to t('.sign_up', default: 'Sign up'), new_registration_path(resource_name)
6
- %br/
7
- - if devise_mapping.recoverable? && controller_name != 'passwords'
8
- = link_to t('.forgot_your_password', default: 'Forgot your password?'), new_password_path(resource_name)
9
- %br/
10
- - if devise_mapping.confirmable? && controller_name != 'confirmations'
11
- = link_to t('.didn_t_receive_confirmation_instructions', default: "Didn't receive confirmation instructions?"), new_confirmation_path(resource_name)
12
- %br/
13
- - if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks'
14
- = link_to t('.didn_t_receive_unlock_instructions', default: "Didn't receive unlock instructions?"), new_unlock_path(resource_name)
15
- %br/
16
- - if devise_mapping.omniauthable?
17
- - resource_class.omniauth_providers.each do |provider|
18
- = link_to t('.sign_in_with_provider', provider: provider.to_s.titleize, default: "Sign in with #{provider.to_s.titleize}"), omniauth_authorize_path(resource_name, provider)
19
- %br/
@@ -1,11 +0,0 @@
1
- = bootstrap_devise_error_messages!
2
- .panel.panel-default.devise-bs
3
- .panel-heading
4
- %h4= t('.resend_unlock_instructions', default: 'Resend unlock instructions')
5
- .panel-body
6
- = form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post, html: { role: "form" } }) do |f|
7
- .form-group
8
- = f.label :email
9
- = f.email_field :email, autofocus: true, class: 'form-control'
10
- = f.submit t('.resend_unlock_instructions', default: 'Resend unlock instructions'), class: 'btn btn-primary'
11
- = render 'devise/shared/links'
@@ -1,12 +0,0 @@
1
- = bootstrap_devise_error_messages!
2
- .panel.panel-default.devise-bs
3
- .panel-heading
4
- h4
5
- = t('.resend_confirmation_instructions', default: 'Resend confirmation instructions')
6
- .panel-body
7
- = form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post, role: 'form' }) do |f|
8
- .form-group
9
- = f.label :email
10
- = f.email_field :email, autofocus: true, class: "form-control"
11
- = f.submit t('.resend_confirmation_instructions', default: 'Resend confirmation instructions'), class: 'btn btn-primary'
12
- = render 'devise/shared/links'
@@ -1,7 +0,0 @@
1
- p
2
- = t('.greeting', recipient: @resource.email, default: "Welcome #{@resource.email}!")
3
- p
4
- = t('.instruction', default: 'You can confirm your account email through the link below:')
5
- p
6
- = link_to t('.action', default: 'Confirm my account'),
7
- - confirmation_url(@resource, confirmation_token: @token, locale: I18n.locale)
@@ -1,10 +0,0 @@
1
- p
2
- = t('.greeting', recipient: @resource.email, default: "Hello #{@resource.email}!")
3
- p
4
- = t('.instruction', default: 'Someone has requested a link to change your password, and you can do this through the link below.')
5
- p
6
- = link_to t('.action', default: 'Change my password'), edit_password_url(@resource, reset_password_token: @token, locale: I18n.locale)
7
- p
8
- = t('.instruction_2', default: "If you didn't request this, please ignore this email.")
9
- p
10
- = t('.instruction_3', default: "Your password won't change until you access the link above and create a new one.")
@@ -1,8 +0,0 @@
1
- p
2
- = t('.greeting', recipient: @resource.email, default: "Hello #{@resource.email}!")
3
- p
4
- = t('.message', default: 'Your account has been locked due to an excessive amount of unsuccessful sign in attempts.')
5
- p
6
- = t('.instruction', default: 'Click the link below to unlock your account:')
7
- p
8
- = link_to t('.action', default: 'Unlock my account'), unlock_url(@resource, unlock_token: @resource.unlock_token, locale: I18n.locale)
@@ -1,16 +0,0 @@
1
- = bootstrap_devise_error_messages!
2
- .panel.panel-default.devise-bs
3
- .panel-heading
4
- h4
5
- = t('.change_your_password', default: 'Change your password')
6
- .panel-body
7
- = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put, role: 'form' }) do |f|
8
- = f.hidden_field :reset_password_token
9
- .form-group
10
- = f.label :password, t('.new_password', default: 'New password')
11
- = f.password_field :password, autofocus: true, class: 'form-control'
12
- .form-group
13
- = f.label :password_confirmation, t('.confirm_new_password', default: 'Confirm new password')
14
- = f.password_field :password_confirmation, class: 'form-control'
15
- = f.submit t('.change_my_password', default: 'Change my password'), class: 'btn btn-primary'
16
- = render 'devise/shared/links'
@@ -1,12 +0,0 @@
1
- = bootstrap_devise_error_messages!
2
- .panel.panel-default.devise-bs
3
- .panel-heading
4
- h4
5
- = t('.forgot_your_password', default: 'Forgot your password?')
6
- .panel-body
7
- = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post, role: "form" }) do |f|
8
- .form-group
9
- = f.label :email
10
- = f.email_field :email, autofocus: true, class: 'form-control'
11
- = f.submit t('.send_me_reset_password_instructions', default: 'Send me reset password instructions'), class: 'btn btn-primary'
12
- = render 'devise/shared/links'
@@ -1,34 +0,0 @@
1
- = bootstrap_devise_error_messages!
2
- .panel.panel-default.devise-bs
3
- .panel-heading
4
- h4
5
- = t('.title', resource: resource_class.model_name.human , default: "Edit #{resource_name.to_s.humanize}")
6
- .panel-body
7
- = form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f|
8
- .form-group
9
- = f.label :email
10
- = f.email_field :email, autofocus: true, class: 'form-control'
11
- .form-group
12
- = f.label :password
13
- i
14
- | (
15
- = t('.leave_blank_if_you_don_t_want_to_change_it', default: "leave blank if you don't want to change it")
16
- | )
17
- = f.password_field :password, autocomplete: "off", class: 'form-control'
18
- .form-group
19
- = f.label :password_confirmation
20
- = f.password_field :password_confirmation, class: 'form-control'
21
- .form-group
22
- = f.label :current_password
23
- i
24
- | (
25
- = t('.we_need_your_current_password_to_confirm_your_changes', default: 'we need your current password to confirm your changes')
26
- | )
27
- = f.password_field :current_password, class: 'form-control'
28
- = f.submit t('.update', default: 'Update'), class: 'btn btn-primary'
29
- p
30
- = t('.unhappy', default: 'Unhappy')
31
- | ?
32
- = link_to t('.cancel_my_account', default: 'Cancel my account'), registration_path(resource_name), data: { confirm: t('.are_you_sure', default: "Are you sure?") }, method: :delete
33
- | .
34
- = link_to t('.back', default: 'Back'), :back
@@ -1,18 +0,0 @@
1
- = bootstrap_devise_error_messages!
2
- .panel.panel-default.devise-bs
3
- .panel-heading
4
- h4
5
- = t('.sign_up', default: 'Sign up')
6
- .panel-body
7
- = form_for(resource, as: resource_name, url: registration_path(resource_name), html: { role: 'form' }) do |f|
8
- .form-group
9
- = f.label :email
10
- = f.email_field :email, autofocus: true, class: 'form-control'
11
- .form-group
12
- = f.label :password
13
- = f.password_field :password, class: 'form-control'
14
- .form-group
15
- = f.label :password_confirmation
16
- = f.password_field :password_confirmation, class: 'form-control'
17
- = f.submit t('.sign_up', default: 'Sign up'), class: 'btn btn-primary'
18
- = render 'devise/shared/links'
@@ -1,19 +0,0 @@
1
- .panel.panel-default.devise-bs
2
- .panel-heading
3
- h4
4
- = t('.sign_in', default: 'Sign in')
5
- .panel-body
6
- = form_for(resource, as: resource_name, url: session_path(resource_name), html: { role: 'form' }) do |f|
7
- .form-group
8
- = f.label :email
9
- = f.email_field :email, autofocus: true, class: 'form-control'
10
- .form-group
11
- = f.label :password
12
- = f.password_field :password, autocomplete: 'off', class: 'form-control'
13
- - if devise_mapping.rememberable?
14
- .checkbox
15
- = f.label :remember_me do
16
- = f.check_box :remember_me
17
- = t('.remember_me', default: 'Remember me')
18
- = f.submit t('.sign_in', default: 'Sign in'), class: 'btn btn-primary'
19
- = render 'devise/shared/links'
@@ -1,19 +0,0 @@
1
- - if controller_name != 'sessions'
2
- = link_to t('.sign_in', default: 'Sign in'), new_session_path(resource_name)
3
- br
4
- - if devise_mapping.registerable? && controller_name != 'registrations'
5
- = link_to t('.sign_up', default: 'Sign up'), new_registration_path(resource_name)
6
- br
7
- - if devise_mapping.recoverable? && controller_name != 'passwords'
8
- = link_to t('.forgot_your_password', default: 'Forgot your password?'), new_password_path(resource_name)
9
- br
10
- - if devise_mapping.confirmable? && controller_name != 'confirmations'
11
- = link_to t('.didn_t_receive_confirmation_instructions', default: "Didn't receive confirmation instructions?"), new_confirmation_path(resource_name)
12
- br
13
- - if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks'
14
- = link_to t('.didn_t_receive_unlock_instructions', default: "Didn't receive unlock instructions?"), new_unlock_path(resource_name)
15
- br
16
- - if devise_mapping.omniauthable?
17
- - resource_class.omniauth_providers.each do |provider|
18
- = link_to t('.sign_in_with_provider', provider: provider.to_s.titleize, default: "Sign in with #{provider.to_s.titleize}"), omniauth_authorize_path(resource_name, provider)
19
- br
@@ -1,12 +0,0 @@
1
- = bootstrap_devise_error_messages!
2
- .panel.panel-default.devise-bs
3
- .panel-heading
4
- h4
5
- = t('.resend_unlock_instructions', default: 'Resend unlock instructions')
6
- .panel-body
7
- = form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post, html: { role: "form" } }) do |f|
8
- .form-group
9
- = f.label :email
10
- = f.email_field :email, autofocus: true, class: 'form-control'
11
- = f.submit t('.resend_unlock_instructions', default: 'Resend unlock instructions'), class: 'btn btn-primary'
12
- = render 'devise/shared/links'
@@ -1,10 +0,0 @@
1
- module Devise
2
- module Views
3
- class BootstrapHamlTemplatesGenerator < Rails::Generators::Base
4
- source_root File.expand_path('../../../../../../app/views', __FILE__)
5
- def copy_views
6
- directory("haml", Rails.root.join("app", "views", "devise"))
7
- end
8
- end
9
- end
10
- end
@@ -1,10 +0,0 @@
1
- module Devise
2
- module Views
3
- class BootstrapSlimTemplatesGenerator < Rails::Generators::Base
4
- source_root File.expand_path('../../../../../../app/views', __FILE__)
5
- def copy_views
6
- directory("slim", Rails.root.join("app", "views", "devise"))
7
- end
8
- end
9
- end
10
- end