jobshop 0.0.131 → 0.0.157

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/Rakefile +16 -9
  4. data/app/controllers/concerns/jobshop/authentication_handler.rb +15 -0
  5. data/app/controllers/concerns/jobshop/authorization_handler.rb +29 -0
  6. data/app/controllers/jobshop/application_controller.rb +5 -32
  7. data/app/controllers/jobshop/organizations/lookups_controller.rb +18 -0
  8. data/app/controllers/jobshop/places_controller.rb +1 -1
  9. data/app/controllers/jobshop/{welcome/registrations_controller.rb → registrations_controller.rb} +2 -7
  10. data/app/controllers/jobshop/session_activations_controller.rb +1 -1
  11. data/app/controllers/jobshop/sessions_controller.rb +15 -1
  12. data/app/controllers/jobshop/users_controller.rb +9 -0
  13. data/app/mailers/jobshop/application_mailer.rb +2 -2
  14. data/app/models/jobshop/ability.rb +7 -0
  15. data/app/models/jobshop/collection.rb +22 -0
  16. data/app/models/jobshop/company.rb +22 -0
  17. data/app/models/jobshop/dashboard.rb +1 -1
  18. data/app/models/jobshop/inspection/boolean_criterion.rb +44 -0
  19. data/app/models/jobshop/inspection/criterion.rb +22 -0
  20. data/app/models/jobshop/inspection/deviation_criterion.rb +112 -0
  21. data/app/models/jobshop/inspection/limit_criterion.rb +114 -0
  22. data/app/models/jobshop/inspection/report.rb +41 -0
  23. data/app/models/jobshop/inspection/result.rb +42 -0
  24. data/app/models/jobshop/inspection/tuple.rb +13 -0
  25. data/app/models/jobshop/inspection.rb +13 -0
  26. data/app/models/jobshop/order.rb +41 -0
  27. data/app/models/jobshop/order_line.rb +13 -0
  28. data/app/models/jobshop/organization.rb +34 -0
  29. data/app/models/jobshop/place.rb +6 -4
  30. data/app/models/jobshop/product.rb +23 -0
  31. data/app/models/jobshop/registration.rb +14 -10
  32. data/app/models/jobshop/role.rb +24 -0
  33. data/app/models/jobshop/role_ability.rb +7 -0
  34. data/app/models/jobshop/role_assignment.rb +7 -0
  35. data/app/models/jobshop/routing_process.rb +20 -0
  36. data/app/models/jobshop/routing_step.rb +11 -0
  37. data/app/models/jobshop/thing.rb +30 -4
  38. data/app/models/jobshop/user.rb +23 -25
  39. data/app/serializers/jobshop/test_user_serializer.rb +10 -0
  40. data/app/services/jobshop/authentication_service.rb +20 -0
  41. data/app/services/jobshop/authorization_service.rb +30 -0
  42. data/app/services/jobshop/jwt_service.rb +17 -0
  43. data/config/routes.rb +2 -43
  44. data/db/migrate/20170311194758_initialize_jobshop.rb +1 -106
  45. data/db/migrate/20171216021339_create_organizations.rb +20 -0
  46. data/db/migrate/20171216021717_create_users.rb +30 -0
  47. data/db/migrate/20171216021853_create_companies.rb +25 -0
  48. data/db/migrate/20171216022020_create_places.rb +22 -0
  49. data/db/migrate/20171216022135_create_products.rb +27 -0
  50. data/db/migrate/20171216022605_create_orders.rb +53 -0
  51. data/db/migrate/20171216023018_create_roles.rb +52 -0
  52. data/db/migrate/20171216023022_create_sessions.rb +21 -0
  53. data/db/migrate/20171216035357_create_things.rb +44 -0
  54. data/db/migrate/20171219022118_create_routing_processes.rb +57 -0
  55. data/db/migrate/20180107203241_create_inspection.rb +159 -0
  56. data/{app/assets/stylesheets/jobshop/welcome.scss → db/seeds.rb} +0 -0
  57. data/lib/generators/jobshop/app/app_generator.rb +36 -3
  58. data/lib/generators/jobshop/app/templates/config/database.yml.tt +19 -0
  59. data/lib/generators/jobshop/config/templates/config/initializers/jobshop.rb.tt +0 -2
  60. data/lib/generators/jobshop/dummy/dummy_generator.rb +3 -14
  61. data/lib/jobshop/cli/spinner.rb +21 -0
  62. data/lib/jobshop/cli.rb +44 -24
  63. data/lib/jobshop/configuration.rb +24 -0
  64. data/lib/jobshop/dummy_app.rb +155 -0
  65. data/lib/jobshop/engine.rb +30 -31
  66. data/lib/jobshop/helpers/migration.rb +55 -0
  67. data/lib/jobshop/version.rb +2 -2
  68. data/lib/jobshop.rb +7 -21
  69. data/lib/tasks/jobshop_tasks.rake +7 -24
  70. metadata +113 -150
  71. data/app/assets/config/jobshop_manifest.js +0 -2
  72. data/app/assets/images/jobshop/logo.svg +0 -50
  73. data/app/assets/javascripts/jobshop/application.js +0 -34
  74. data/app/assets/stylesheets/jobshop/application.scss +0 -57
  75. data/app/assets/stylesheets/jobshop/breakpoints.scss +0 -47
  76. data/app/assets/stylesheets/jobshop/dialog.scss +0 -43
  77. data/app/controllers/concerns/registration_token_validation.rb +0 -41
  78. data/app/controllers/jobshop/teams/lookups_controller.rb +0 -20
  79. data/app/controllers/jobshop/teams_controller.rb +0 -6
  80. data/app/controllers/jobshop/welcome/places_controller.rb +0 -42
  81. data/app/controllers/jobshop/welcome/things_controller.rb +0 -42
  82. data/app/controllers/jobshop/welcome_controller.rb +0 -11
  83. data/app/helpers/jobshop/application_helper.rb +0 -14
  84. data/app/mailers/jobshop/teams_mailer.rb +0 -10
  85. data/app/models/jobshop/team.rb +0 -36
  86. data/app/policies/jobshop/application_policy.rb +0 -55
  87. data/app/views/devise/confirmations/new.html.haml +0 -10
  88. data/app/views/devise/mailer/confirmation_instructions.html.haml +0 -4
  89. data/app/views/devise/mailer/password_change.html.haml +0 -3
  90. data/app/views/devise/mailer/reset_password_instructions.html.haml +0 -6
  91. data/app/views/devise/mailer/unlock_instructions.html.haml +0 -5
  92. data/app/views/devise/passwords/edit.html.haml +0 -19
  93. data/app/views/devise/passwords/new.html.haml +0 -10
  94. data/app/views/devise/registrations/edit.html.haml +0 -31
  95. data/app/views/devise/registrations/new.html.haml +0 -21
  96. data/app/views/devise/sessions/new.html.haml +0 -15
  97. data/app/views/devise/shared/_links.html.haml +0 -19
  98. data/app/views/devise/unlocks/new.html.haml +0 -10
  99. data/app/views/jobshop/dashboards/show.html.haml +0 -140
  100. data/app/views/jobshop/places/show.html.haml +0 -12
  101. data/app/views/jobshop/session_activations/destroy.js.erb +0 -1
  102. data/app/views/jobshop/shared/_authenticated_header.html.haml +0 -8
  103. data/app/views/jobshop/shared/_unauthenticated_header.html.haml +0 -10
  104. data/app/views/jobshop/teams/lookups/show.html.haml +0 -14
  105. data/app/views/jobshop/teams_mailer/found_teams.html.haml +0 -11
  106. data/app/views/jobshop/teams_mailer/found_teams.text.erb +0 -8
  107. data/app/views/jobshop/welcome/index.html.haml +0 -21
  108. data/app/views/jobshop/welcome/places/new.html.haml +0 -22
  109. data/app/views/jobshop/welcome/registrations/new.html.haml +0 -32
  110. data/app/views/jobshop/welcome/things/new.html.haml +0 -24
  111. data/app/views/layouts/jobshop/application.html.haml +0 -15
  112. data/app/views/layouts/jobshop/unauthenticated.html.haml +0 -6
  113. data/config/initializers/assets.rb +0 -11
  114. data/config/initializers/devise.rb +0 -282
  115. data/config/initializers/field_with_errors.rb +0 -3
  116. data/config/initializers/simple_form.rb +0 -157
  117. data/config/locales/devise.en.yml +0 -62
  118. data/config/locales/simple_form.en.yml +0 -31
  119. data/db/migrate/keep +0 -0
  120. data/lib/generators/jobshop/team/USAGE +0 -7
  121. data/lib/generators/jobshop/team/team_generator.rb +0 -60
  122. data/lib/jobshop/failure_app.rb +0 -11
@@ -1,47 +0,0 @@
1
- a {
2
- color: red;
3
- }
4
-
5
- $breakpoints: (
6
- s-handset-p: 0px,
7
- m-handset-p: 360px,
8
- l-handset-p: 400px,
9
- xl-handset-p: 480px,
10
- s-tablet-p: 600px,
11
- m-tablet-p: 720px,
12
- l-tablet-p: 840px,
13
- s-handset-l: 480px,
14
- m-handset-l: 600px,
15
- l-handset-l: 720px,
16
- xl-handset-l: 840px,
17
- s-tablet-l: 960px,
18
- m-tablet-l: 1024px,
19
- l-tablet-l: 1280px,
20
- s-desktop: 1440px,
21
- m-desktop: 1600px,
22
- l-desktop: 1920px
23
- );
24
-
25
- @mixin handset {
26
- @media screen and (max-width: #{map-get($breakpoints, xl-handset-l)}) {
27
- @content;
28
- }
29
- }
30
-
31
- @mixin larger-than-handset-l {
32
- @media screen and (min-width: #{map-get($breakpoints, xl-handset-l)}) {
33
- @content;
34
- }
35
- }
36
-
37
- @mixin larger-than-handset-p {
38
- @media screen and (min-width: #{map-get($breakpoints, xl-handset-p)}) {
39
- @content;
40
- }
41
- }
42
-
43
- @mixin tablet-up {
44
- @media screen and (min-width: #{map-get($breakpoints, xl-handset-p) + 1}) {
45
- @content;
46
- }
47
- }
@@ -1,43 +0,0 @@
1
- .dialog-box {
2
- @extend .mdl-grid;
3
- @extend .mdl-shadow--2dp;
4
-
5
- background: $card-background-color;
6
- max-width: 480px;
7
- }
8
-
9
- .dialog-box .dialog-box__header {
10
- @extend .mdl-cell;
11
- @extend .mdl-cell--4-col;
12
- @extend .mdl-color-text--white;
13
-
14
- align-items: flex-start;
15
- background-color: unquote("rgb(#{$palette-indigo-500})");
16
- display: flex;
17
- justify-content: center;
18
-
19
- @include handset {
20
- display: none;
21
- }
22
-
23
- & > .material-icons {
24
- font-size: 10rem;
25
- margin-top: 1rem;
26
- }
27
- }
28
-
29
- .dialog-box .dialog-box__content {
30
- @extend .mdl-cell;
31
- @extend .mdl-cell--12-col;
32
- @extend .mdl-card;
33
- }
34
-
35
- .dialog-box .dialog-box__header + .dialog-box__content {
36
- @extend .mdl-cell--8-col;
37
- }
38
-
39
-
40
- .dialog-box .dialog-box__content .mdl-card__actions {
41
- display: flex;
42
- justify-content: space-between;
43
- }
@@ -1,41 +0,0 @@
1
- class RegistrationTokenValidation
2
- def self.before(controller)
3
- new(controller.dup)
4
- end
5
-
6
- def initialize(controller)
7
- @controller = controller
8
- @token = @controller.params.fetch(:registration_token, nil)
9
- @team_id = @controller.params.fetch(:team_id, nil)
10
-
11
- if @token
12
- @controller.redirect_to(@controller.new_user_session_path(team_id: @team_id)) unless valid?
13
- end
14
- end
15
-
16
- def valid?
17
- !expired? && !owned? && resolves?
18
- end
19
-
20
- private
21
- def team
22
- @team ||= Jobshop::Team.where(id: @team_id).first
23
- end
24
-
25
- def resolves?
26
- encrypted_token = Devise.token_generator.digest(
27
- Jobshop::Team, :registration_token, @token)
28
-
29
- # Notice how we use Devise.secure_compare to compare the token in the
30
- # database with the token given in the params, mitigating timing attacks.
31
- Devise.secure_compare(team.registration_token, encrypted_token)
32
- end
33
-
34
- def expired?
35
- @expired ||= !team.registration_token_period_valid?
36
- end
37
-
38
- def owned?
39
- @owned ||= team.owner.present?
40
- end
41
- end
@@ -1,20 +0,0 @@
1
- require_dependency "jobshop/application_controller"
2
-
3
- module Jobshop
4
- class Teams::LookupsController < ApplicationController
5
- skip_before_action :authenticate_user!
6
-
7
- def show
8
- @lookup = Jobshop::User.new
9
- end
10
-
11
- def create
12
- emails = params[:user][:email].split(",").map(&:strip).take(5)
13
- Jobshop::Team.grouped_by_email(emails).each_pair do |email, teams|
14
- Jobshop::TeamsMailer.found_teams(email, teams).deliver_now
15
- end
16
-
17
- redirect_to teams_lookup_path
18
- end
19
- end
20
- end
@@ -1,6 +0,0 @@
1
- require_dependency "jobshop/application_controller"
2
-
3
- module Jobshop
4
- class TeamsController < ApplicationController
5
- end
6
- end
@@ -1,42 +0,0 @@
1
- require_dependency "jobshop/application_controller"
2
-
3
- module Jobshop
4
- class Welcome::PlacesController < ApplicationController
5
- respond_to :html
6
-
7
- def new
8
- @place = if session[:place_id].present?
9
- current_team.places.find_by(id: session[:place_id])
10
- end
11
- @place ||= current_team.places.build
12
- respond_with(@place)
13
- end
14
-
15
- def index
16
- redirect_to new_welcome_places_path
17
- end
18
-
19
- def create
20
- if @place = current_team.places.create(place_params)
21
- session[:place_id] = @place.id
22
- session[:next_onboard_path] = "/"
23
- end
24
-
25
- respond_with @place, location: -> { "/" }
26
- end
27
-
28
- def update
29
- @place = current_team.places.find(params[:id])
30
- if @place.update(place_params)
31
- session[:place_id] = @place.id
32
- respond_with @place, location: -> { "/" }
33
- else
34
- render :new
35
- end
36
- end
37
-
38
- private def place_params
39
- params.require(:place).permit(:name)
40
- end
41
- end
42
- end
@@ -1,42 +0,0 @@
1
- require_dependency "jobshop/application_controller"
2
-
3
- module Jobshop
4
- class Welcome::ThingsController < ApplicationController
5
- respond_to :html
6
-
7
- def new
8
- @thing = if session[:thing_id].present?
9
- current_team.things.find_by(id: session[:thing_id])
10
- end
11
- @thing ||= current_team.things.build
12
- respond_with(@thing)
13
- end
14
-
15
- def index
16
- redirect_to new_welcome_things_path
17
- end
18
-
19
- def create
20
- if @thing = current_team.things.create(thing_params)
21
- session[:thing_id] = @thing.id
22
- session[:next_onboard_path] = new_welcome_places_path
23
- end
24
-
25
- respond_with @thing, location: -> { new_welcome_places_path }
26
- end
27
-
28
- def update
29
- @thing = current_team.things.find(params[:id])
30
- if @thing.update(thing_params)
31
- session[:thing_id] = @thing.id
32
- respond_with @thing, location: -> { new_welcome_places_path }
33
- else
34
- render :new
35
- end
36
- end
37
-
38
- private def thing_params
39
- params.require(:thing).permit(:identifier)
40
- end
41
- end
42
- end
@@ -1,11 +0,0 @@
1
- require_dependency "jobshop/application_controller"
2
-
3
- module Jobshop
4
- class WelcomeController < ApplicationController
5
- def index
6
- if session[:next_onboard_path].present?
7
- redirect_to session[:next_onboard_path]
8
- end
9
- end
10
- end
11
- end
@@ -1,14 +0,0 @@
1
- module Jobshop
2
- module ApplicationHelper
3
- def body_class
4
- @body_class ||= [
5
- controller_class,
6
- "#{controller_name}__#{action_name}"
7
- ].flatten.uniq.compact
8
- end
9
-
10
- private def controller_class
11
- @controller_class = controller_path.split("/").reject { |i| i == "jobshop" }
12
- end
13
- end
14
- end
@@ -1,10 +0,0 @@
1
- module Jobshop
2
- class TeamsMailer < ApplicationMailer
3
- def found_teams(email, teams)
4
- @user = Jobshop::User.where(email: email).first
5
- @teams = teams
6
-
7
- mail(to: email, subject: "We found your Jobshop Teams!")
8
- end
9
- end
10
- end
@@ -1,36 +0,0 @@
1
- module Jobshop
2
- class Team < ApplicationRecord
3
- belongs_to :owner, class_name: "Jobshop::User", optional: true
4
- has_many :users
5
- has_many :things
6
- has_many :places
7
- has_one :default_dashboard, class_name: "Jobshop::Dashboard"
8
-
9
- scope :grouped_by_email, ->(email_addresses) {
10
- Jobshop::User
11
- .where(email: email_addresses)
12
- .joins(:team)
13
- .includes(:team)
14
- .each_with_object({}) { |user, teams|
15
- (teams[user.email] ||= []) << user.team
16
- }
17
- }
18
-
19
- def generate_registration_token
20
- return false if owner_id
21
- raw, encrypted = Devise.token_generator.generate(
22
- self.class, :registration_token)
23
-
24
- self.registration_token = encrypted
25
- self.registration_token_sent_at = Time.now.utc
26
- self.save(validate: false)
27
-
28
- raw
29
- end
30
-
31
- def registration_token_period_valid?
32
- registration_token_sent_at &&
33
- registration_token_sent_at.utc >= 30.minutes.ago.utc
34
- end
35
- end
36
- end
@@ -1,55 +0,0 @@
1
- module Jobshop
2
- class ApplicationPolicy
3
- attr_reader :user, :record
4
-
5
- def initialize(user, record)
6
- raise Jobshop::NotAuthenticatedError unless user
7
- @user, @record = user, record
8
- end
9
-
10
- def index?
11
- false
12
- end
13
-
14
- def show?
15
- scope.where(:id => record.id).exists?
16
- end
17
-
18
- def create?
19
- false
20
- end
21
-
22
- def new?
23
- create?
24
- end
25
-
26
- def update?
27
- false
28
- end
29
-
30
- def edit?
31
- update?
32
- end
33
-
34
- def destroy?
35
- false
36
- end
37
-
38
- def scope
39
- Pundit.policy_scope!(user, record.class)
40
- end
41
-
42
- class Scope
43
- attr_reader :user, :scope
44
-
45
- def initialize(user, scope)
46
- raise Jobshop::NotAuthenticatedError unless user
47
- @user, @scope = user, scope
48
- end
49
-
50
- def resolve
51
- scope
52
- end
53
- end
54
- end
55
- end
@@ -1,10 +0,0 @@
1
- %h2 Resend confirmation instructions
2
- = form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f|
3
- = devise_error_messages!
4
- .field
5
- = f.label :email
6
- %br/
7
- = f.email_field :email, autofocus: true, value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email)
8
- .actions
9
- = f.submit "Resend confirmation instructions"
10
- = render "devise/shared/links"
@@ -1,4 +0,0 @@
1
- %p
2
- Welcome #{@email}!
3
- %p You can confirm your account email through the link below:
4
- %p= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token)
@@ -1,3 +0,0 @@
1
- %p
2
- Hello #{@resource.email}!
3
- %p We're contacting you to notify you that your password has been changed.
@@ -1,6 +0,0 @@
1
- %p
2
- Hello #{@resource.email}!
3
- %p Someone has requested a link to change your password. You can do this through the link below.
4
- %p= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token)
5
- %p If you didn't request this, please ignore this email.
6
- %p Your password won't change until you access the link above and create a new one.
@@ -1,5 +0,0 @@
1
- %p
2
- Hello #{@resource.email}!
3
- %p Your account has been locked due to an excessive number of unsuccessful sign in attempts.
4
- %p Click the link below to unlock your account:
5
- %p= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token)
@@ -1,19 +0,0 @@
1
- %h2 Change your password
2
- = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f|
3
- = devise_error_messages!
4
- = f.hidden_field :reset_password_token
5
- .field
6
- = f.label :password, "New password"
7
- %br/
8
- - if @minimum_password_length
9
- %em
10
- (#{@minimum_password_length} characters minimum)
11
- %br/
12
- = f.password_field :password, autofocus: true, autocomplete: "off"
13
- .field
14
- = f.label :password_confirmation, "Confirm new password"
15
- %br/
16
- = f.password_field :password_confirmation, autocomplete: "off"
17
- .actions
18
- = f.submit "Change my password"
19
- = render "devise/shared/links"
@@ -1,10 +0,0 @@
1
- %h2 Forgot your password?
2
- = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f|
3
- = devise_error_messages!
4
- .field
5
- = f.label :email
6
- %br/
7
- = f.email_field :email, autofocus: true
8
- .actions
9
- = f.submit "Send me reset password instructions"
10
- = render "devise/shared/links"
@@ -1,31 +0,0 @@
1
- %h2
2
- Edit #{resource_name.to_s.humanize}
3
- = form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f|
4
- = devise_error_messages!
5
- .field
6
- = f.label :email
7
- %br/
8
- = f.email_field :email, autofocus: true
9
- - if devise_mapping.confirmable? && resource.pending_reconfirmation?
10
- %div
11
- Currently waiting confirmation for: #{resource.unconfirmed_email}
12
- .field
13
- = f.label :password
14
- %i (leave blank if you don't want to change it)
15
- %br/
16
- = f.password_field :password, autocomplete: "off"
17
- .field
18
- = f.label :password_confirmation
19
- %br/
20
- = f.password_field :password_confirmation, autocomplete: "off"
21
- .field
22
- = f.label :current_password
23
- %i (we need your current password to confirm your changes)
24
- %br/
25
- = f.password_field :current_password, autocomplete: "off"
26
- .actions
27
- = f.submit "Update"
28
- %h3 Cancel my account
29
- %p
30
- Unhappy? #{button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete}
31
- = link_to "Back", :back
@@ -1,21 +0,0 @@
1
- %h2 Sign up
2
- = form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
3
- = devise_error_messages!
4
- .field
5
- = f.label :email
6
- %br/
7
- = f.email_field :email, autofocus: true
8
- .field
9
- = f.label :password
10
- - if @minimum_password_length
11
- %em
12
- (#{@minimum_password_length} characters minimum)
13
- %br/
14
- = f.password_field :password, autocomplete: "off"
15
- .field
16
- = f.label :password_confirmation
17
- %br/
18
- = f.password_field :password_confirmation, autocomplete: "off"
19
- .actions
20
- = f.submit "Sign up"
21
- = render "devise/shared/links"
@@ -1,15 +0,0 @@
1
- %main.mdl-layout__content
2
- .dialog-box(style="max-width: 400px;")
3
- .dialog-box__content
4
- = simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
5
- .mdl-card__title
6
- %object.logo{ type: "image/svg+xml", data: image_path("jobshop/logo.svg"), style: "margin: 0 auto;" }
7
-
8
- .mdl-card__supporting-text
9
- = f.input(:email)
10
- = f.input(:password)
11
- = f.input(:team_id, as: :hidden, input_html: { value: params[:team_id] })
12
-
13
- .mdl-card__actions
14
- = f.input :remember_me, as: :boolean, input_html: { class: "mdl-checkbox__input" }
15
- = f.button :submit, "Log in"
@@ -1,19 +0,0 @@
1
- - if controller_name != 'sessions'
2
- = link_to "Log in", new_session_path(resource_name)
3
- %br/
4
- - if devise_mapping.registerable? && controller_name != 'registrations'
5
- = link_to "Sign up", new_registration_path(resource_name)
6
- %br/
7
- - if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations'
8
- = link_to "Forgot your password?", new_password_path(resource_name)
9
- %br/
10
- - if devise_mapping.confirmable? && controller_name != 'confirmations'
11
- = link_to "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 "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 "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider)
19
- %br/
@@ -1,10 +0,0 @@
1
- %h2 Resend unlock instructions
2
- = form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f|
3
- = devise_error_messages!
4
- .field
5
- = f.label :email
6
- %br/
7
- = f.email_field :email, autofocus: true
8
- .actions
9
- = f.submit "Resend unlock instructions"
10
- = render "devise/shared/links"