phoenixbricks 3.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/Gemfile +7 -0
- data/LICENSE.txt +674 -0
- data/README.md +85 -0
- data/bin/rbricks +5 -0
- data/lib/railsbricks.rb +115 -0
- data/lib/railsbricks/app_generator.rb +352 -0
- data/lib/railsbricks/assets/config/admin_post_routes.rbr +3 -0
- data/lib/railsbricks/assets/config/application.yml +9 -0
- data/lib/railsbricks/assets/config/contact_routes.rbr +2 -0
- data/lib/railsbricks/assets/config/initializers/devise_email/devise.rb +267 -0
- data/lib/railsbricks/assets/config/initializers/devise_username/devise.rb +267 -0
- data/lib/railsbricks/assets/config/post_routes.rbr +2 -0
- data/lib/railsbricks/assets/config/routes.rb +15 -0
- data/lib/railsbricks/assets/config/unicorn.rb +22 -0
- data/lib/railsbricks/assets/controllers/admin/base_controller.rb +10 -0
- data/lib/railsbricks/assets/controllers/admin/devise_email/users_controller.rb +66 -0
- data/lib/railsbricks/assets/controllers/admin/devise_username/users_controller.rb +69 -0
- data/lib/railsbricks/assets/controllers/admin/posts_controller.rb +73 -0
- data/lib/railsbricks/assets/controllers/brick_contact.rbr +23 -0
- data/lib/railsbricks/assets/controllers/devise_email/application_controller.rb +54 -0
- data/lib/railsbricks/assets/controllers/devise_username/application_controller.rb +56 -0
- data/lib/railsbricks/assets/controllers/pages_controller.rb +13 -0
- data/lib/railsbricks/assets/controllers/posts_controller.rbr +10 -0
- data/lib/railsbricks/assets/database/postgresql.yml +12 -0
- data/lib/railsbricks/assets/database/sqlite3.yml +8 -0
- data/lib/railsbricks/assets/gemfile/Gemfile +44 -0
- data/lib/railsbricks/assets/git/gitignore +30 -0
- data/lib/railsbricks/assets/javascripts/analytics.js.coffee +5 -0
- data/lib/railsbricks/assets/lib/markdown_writer.rb +19 -0
- data/lib/railsbricks/assets/mailers/contact_mailer.rb +13 -0
- data/lib/railsbricks/assets/migrations/20141010133702_create_posts.rb +17 -0
- data/lib/railsbricks/assets/migrations/devise_email/20141010133701_devise_create_users.rb +48 -0
- data/lib/railsbricks/assets/migrations/devise_username/20141010133701_devise_create_users.rb +54 -0
- data/lib/railsbricks/assets/models/devise_email/user.rb +41 -0
- data/lib/railsbricks/assets/models/devise_username/user.rb +57 -0
- data/lib/railsbricks/assets/models/post.rb +30 -0
- data/lib/railsbricks/assets/procfile/Procfile +1 -0
- data/lib/railsbricks/assets/seeds/devise_email/seeds_no_test_users.rb +11 -0
- data/lib/railsbricks/assets/seeds/devise_email/seeds_test_users.rb +24 -0
- data/lib/railsbricks/assets/seeds/devise_username/seeds_no_test_users.rb +12 -0
- data/lib/railsbricks/assets/seeds/devise_username/seeds_test_users.rb +26 -0
- data/lib/railsbricks/assets/stylesheets/application.scss +6 -0
- data/lib/railsbricks/assets/stylesheets/railsbricks_custom.scss +562 -0
- data/lib/railsbricks/assets/views/admin/base/admin_posts_link.rbr +1 -0
- data/lib/railsbricks/assets/views/admin/base/devise_email/index.html.erb +41 -0
- data/lib/railsbricks/assets/views/admin/base/devise_username/index.html.erb +41 -0
- data/lib/railsbricks/assets/views/admin/posts/_form.html.erb +54 -0
- data/lib/railsbricks/assets/views/admin/posts/dashboard.html.erb +9 -0
- data/lib/railsbricks/assets/views/admin/posts/drafts.html.erb +23 -0
- data/lib/railsbricks/assets/views/admin/posts/edit.html.erb +10 -0
- data/lib/railsbricks/assets/views/admin/posts/index.html.erb +23 -0
- data/lib/railsbricks/assets/views/admin/posts/new.html.erb +6 -0
- data/lib/railsbricks/assets/views/admin/users/devise_email/edit.html.erb +65 -0
- data/lib/railsbricks/assets/views/admin/users/devise_email/index.html.erb +54 -0
- data/lib/railsbricks/assets/views/admin/users/devise_username/edit.html.erb +74 -0
- data/lib/railsbricks/assets/views/admin/users/devise_username/index.html.erb +56 -0
- data/lib/railsbricks/assets/views/contact_mailer/contact_message.html.erb +5 -0
- data/lib/railsbricks/assets/views/devise/allow_signup_links.rbr +11 -0
- data/lib/railsbricks/assets/views/devise/devise_email/confirmations/new.html.erb +31 -0
- data/lib/railsbricks/assets/views/devise/devise_email/mailer/confirmation_instructions.html.erb +12 -0
- data/lib/railsbricks/assets/views/devise/devise_email/mailer/reset_password_instructions.html.erb +15 -0
- data/lib/railsbricks/assets/views/devise/devise_email/passwords/edit.html.erb +43 -0
- data/lib/railsbricks/assets/views/devise/devise_email/passwords/new.html.erb +31 -0
- data/lib/railsbricks/assets/views/devise/devise_email/registrations/edit.html.erb +63 -0
- data/lib/railsbricks/assets/views/devise/devise_email/registrations/new.html.erb +49 -0
- data/lib/railsbricks/assets/views/devise/devise_email/sessions/new.html.erb +49 -0
- data/lib/railsbricks/assets/views/devise/devise_email/shared/_links.erb +19 -0
- data/lib/railsbricks/assets/views/devise/devise_username/confirmations/new.html.erb +31 -0
- data/lib/railsbricks/assets/views/devise/devise_username/mailer/confirmation_instructions.html.erb +12 -0
- data/lib/railsbricks/assets/views/devise/devise_username/mailer/reset_password_instructions.html.erb +15 -0
- data/lib/railsbricks/assets/views/devise/devise_username/passwords/edit.html.erb +43 -0
- data/lib/railsbricks/assets/views/devise/devise_username/passwords/new.html.erb +31 -0
- data/lib/railsbricks/assets/views/devise/devise_username/registrations/edit.html.erb +63 -0
- data/lib/railsbricks/assets/views/devise/devise_username/registrations/new.html.erb +58 -0
- data/lib/railsbricks/assets/views/devise/devise_username/sessions/new.html.erb +49 -0
- data/lib/railsbricks/assets/views/devise/devise_username/shared/_links.erb +19 -0
- data/lib/railsbricks/assets/views/layouts/_navigation_links.html.erb +15 -0
- data/lib/railsbricks/assets/views/layouts/brick_analytics.rbr +11 -0
- data/lib/railsbricks/assets/views/pages/contact.html.erb +46 -0
- data/lib/railsbricks/assets/views/pages/inside.html.erb +4 -0
- data/lib/railsbricks/assets/views/pages/posts.html.erb +18 -0
- data/lib/railsbricks/assets/views/pages/show_post.html.erb +6 -0
- data/lib/railsbricks/auth_builder.rb +147 -0
- data/lib/railsbricks/config_helpers.rb +27 -0
- data/lib/railsbricks/config_values.rb +14 -0
- data/lib/railsbricks/errors.rb +18 -0
- data/lib/railsbricks/file_helpers.rb +54 -0
- data/lib/railsbricks/foundation/README.md +24 -0
- data/lib/railsbricks/foundation/Rakefile +6 -0
- data/lib/railsbricks/foundation/app/assets/images/.keep +0 -0
- data/lib/railsbricks/foundation/app/assets/images/apple-touch-icon-precomposed.png +0 -0
- data/lib/railsbricks/foundation/app/assets/images/apple-touch-icon.png +0 -0
- data/lib/railsbricks/foundation/app/assets/images/favicon.ico +0 -0
- data/lib/railsbricks/foundation/app/assets/javascripts/application.js +17 -0
- data/lib/railsbricks/foundation/app/assets/javascripts/common.js +7 -0
- data/lib/railsbricks/foundation/app/controllers/application_controller.rb +5 -0
- data/lib/railsbricks/foundation/app/controllers/concerns/.keep +0 -0
- data/lib/railsbricks/foundation/app/controllers/pages_controller.rb +7 -0
- data/lib/railsbricks/foundation/app/helpers/application_helper.rb +7 -0
- data/lib/railsbricks/foundation/app/helpers/email_helper.rb +5 -0
- data/lib/railsbricks/foundation/app/mailers/.keep +0 -0
- data/lib/railsbricks/foundation/app/models/.keep +0 -0
- data/lib/railsbricks/foundation/app/models/concerns/.keep +0 -0
- data/lib/railsbricks/foundation/app/views/layouts/_footer.html.erb +18 -0
- data/lib/railsbricks/foundation/app/views/layouts/_messages.html.erb +9 -0
- data/lib/railsbricks/foundation/app/views/layouts/_navigation.html.erb +18 -0
- data/lib/railsbricks/foundation/app/views/layouts/_navigation_links.html.erb +3 -0
- data/lib/railsbricks/foundation/app/views/layouts/application.html.erb +38 -0
- data/lib/railsbricks/foundation/app/views/pages/home.html.erb +2 -0
- data/lib/railsbricks/foundation/bin/bundle +3 -0
- data/lib/railsbricks/foundation/bin/rails +4 -0
- data/lib/railsbricks/foundation/bin/rake +4 -0
- data/lib/railsbricks/foundation/config.ru +4 -0
- data/lib/railsbricks/foundation/config/application.rb +34 -0
- data/lib/railsbricks/foundation/config/boot.rb +4 -0
- data/lib/railsbricks/foundation/config/environment.rb +5 -0
- data/lib/railsbricks/foundation/config/environments/development.rb +41 -0
- data/lib/railsbricks/foundation/config/environments/production.rb +95 -0
- data/lib/railsbricks/foundation/config/environments/test.rb +51 -0
- data/lib/railsbricks/foundation/config/initializers/backtrace_silencers.rb +7 -0
- data/lib/railsbricks/foundation/config/initializers/date_format.rb +27 -0
- data/lib/railsbricks/foundation/config/initializers/filter_parameter_logging.rb +4 -0
- data/lib/railsbricks/foundation/config/initializers/friendly_id.rb +88 -0
- data/lib/railsbricks/foundation/config/initializers/inflections.rb +16 -0
- data/lib/railsbricks/foundation/config/initializers/kaminari_config.rb +10 -0
- data/lib/railsbricks/foundation/config/initializers/mime_types.rb +5 -0
- data/lib/railsbricks/foundation/config/initializers/secret_token.rb +25 -0
- data/lib/railsbricks/foundation/config/initializers/session_store.rb +3 -0
- data/lib/railsbricks/foundation/config/initializers/wrap_parameters.rb +14 -0
- data/lib/railsbricks/foundation/config/locales/en.yml +23 -0
- data/lib/railsbricks/foundation/config/routes.rb +7 -0
- data/lib/railsbricks/foundation/db/migrate/20131103142222_create_friendly_id_slugs.rb +15 -0
- data/lib/railsbricks/foundation/db/schema.rb +29 -0
- data/lib/railsbricks/foundation/db/seeds.rb +0 -0
- data/lib/railsbricks/foundation/lib/assets/.keep +0 -0
- data/lib/railsbricks/foundation/lib/tasks/.keep +0 -0
- data/lib/railsbricks/foundation/public/404.html +58 -0
- data/lib/railsbricks/foundation/public/422.html +58 -0
- data/lib/railsbricks/foundation/public/500.html +57 -0
- data/lib/railsbricks/foundation/public/favicon.ico +0 -0
- data/lib/railsbricks/foundation/public/robots.txt +5 -0
- data/lib/railsbricks/foundation/vendor/assets/javascripts/.keep +0 -0
- data/lib/railsbricks/foundation/vendor/assets/stylesheets/.keep +0 -0
- data/lib/railsbricks/gemfile_builder.rb +118 -0
- data/lib/railsbricks/menu.rb +533 -0
- data/lib/railsbricks/post_builder.rb +103 -0
- data/lib/railsbricks/string_helpers.rb +39 -0
- data/lib/railsbricks/style_builder.rb +97 -0
- data/lib/railsbricks/ui_helpers.rb +11 -0
- data/lib/railsbricks/validator.rb +68 -0
- data/lib/railsbricks/version.rb +34 -0
- data/railsbricks.gemspec +16 -0
- metadata +198 -0
@@ -0,0 +1,11 @@
|
|
1
|
+
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
|
2
|
+
<%= link_to "Sign up", new_registration_path(resource_name) %><br />
|
3
|
+
<% end -%>
|
4
|
+
|
5
|
+
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
|
6
|
+
<%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
|
7
|
+
<% end -%>
|
8
|
+
|
9
|
+
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
|
10
|
+
<%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
|
11
|
+
<% end -%>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<div class="col-sm-6 ">
|
3
|
+
<h1>Resend confirmation instructions</h1>
|
4
|
+
|
5
|
+
<%= form_for(resource, :as => resource_name,
|
6
|
+
:url => confirmation_path(resource_name),
|
7
|
+
:html => { :method => :post, :role => "form" }) do |f| %>
|
8
|
+
|
9
|
+
<%= devise_error_messages! %>
|
10
|
+
|
11
|
+
<div class="form-group">
|
12
|
+
<%= f.label :email %>
|
13
|
+
<div class="row">
|
14
|
+
<div class="col-sm-6">
|
15
|
+
<%= f.text_field :email, :autofocus => true, class: "form-control" %>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<div class="row">
|
21
|
+
<div class="col-sm-6">
|
22
|
+
<%= f.submit "Resend confirmation instructions", class: "btn btn-primary" %>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
|
26
|
+
<% end %>
|
27
|
+
|
28
|
+
<%= render "devise/shared/links" %>
|
29
|
+
|
30
|
+
</div>
|
31
|
+
</div>
|
data/lib/railsbricks/assets/views/devise/devise_email/mailer/confirmation_instructions.html.erb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
<p>Welcome!</p>
|
2
|
+
|
3
|
+
<p>You need to confirm your account email through the link below:</p>
|
4
|
+
|
5
|
+
<p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @token) %></p>
|
6
|
+
<br/>
|
7
|
+
|
8
|
+
<p>
|
9
|
+
Thank you,<br/><br/>
|
10
|
+
Yourself<br/>
|
11
|
+
<%= link_to "Your URL", "#" %>
|
12
|
+
</p>
|
data/lib/railsbricks/assets/views/devise/devise_email/mailer/reset_password_instructions.html.erb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
<p>Hello!</p>
|
2
|
+
|
3
|
+
<p>Someone has requested a link to change your password. You can do this through the link below.</p>
|
4
|
+
|
5
|
+
<p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @token) %></p>
|
6
|
+
|
7
|
+
<p>If you didn't request this, please ignore this email.</p>
|
8
|
+
<p>Your password won't change until you access the link above and create a new one.</p>
|
9
|
+
<br/>
|
10
|
+
|
11
|
+
<p>
|
12
|
+
Thank you,<br/><br/>
|
13
|
+
Yourself<br/>
|
14
|
+
<%= link_to "Your URL", "#" %>
|
15
|
+
</p>
|
@@ -0,0 +1,43 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<div class="col-sm-6 ">
|
3
|
+
<h1>Change your password</h1>
|
4
|
+
|
5
|
+
<%= form_for(resource, :as => resource_name,
|
6
|
+
:url => password_path(resource_name),
|
7
|
+
:html => { :method => :put, :role => "form" }) do |f| %>
|
8
|
+
|
9
|
+
<%= devise_error_messages! %>
|
10
|
+
|
11
|
+
<%= f.hidden_field :reset_password_token %>
|
12
|
+
|
13
|
+
<div class="form-group">
|
14
|
+
<%= f.label :password, "New password" %>
|
15
|
+
<div class="row">
|
16
|
+
<div class="col-sm-6">
|
17
|
+
<%= f.password_field :password, class: "form-control" %>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<div class="form-group">
|
23
|
+
<%= f.label :password_confirmation, "Confirm new password" %>
|
24
|
+
<div class="row">
|
25
|
+
<div class="col-sm-6">
|
26
|
+
<%= f.password_field :password_confirmation, class: "form-control" %>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
|
31
|
+
<div class="row">
|
32
|
+
<div class="col-sm-6">
|
33
|
+
<%= f.submit "Change my password", class: "btn btn-danger" %>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
|
37
|
+
|
38
|
+
<% end %>
|
39
|
+
|
40
|
+
<%= render "devise/shared/links" %>
|
41
|
+
|
42
|
+
</div>
|
43
|
+
</div>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<div class="col-sm-6 ">
|
3
|
+
<h1>Forgot your password?</h1>
|
4
|
+
|
5
|
+
<%= form_for(resource, :as => resource_name,
|
6
|
+
:url => password_path(resource_name),
|
7
|
+
:html => { :method => :post, :role => "form" }) do |f| %>
|
8
|
+
|
9
|
+
<%= devise_error_messages! %>
|
10
|
+
|
11
|
+
|
12
|
+
<div class="form-group">
|
13
|
+
<%= f.label :email %>
|
14
|
+
<div class="row">
|
15
|
+
<div class="col-sm-6">
|
16
|
+
<%= f.email_field :email, :autofocus => true, class: "form-control" %>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
|
21
|
+
|
22
|
+
<div class="row">
|
23
|
+
<div class="col-sm-6">
|
24
|
+
<%= f.submit "Send me reset password instructions", class: "btn btn-primary" %>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
<% end %>
|
28
|
+
|
29
|
+
<%= render "devise/shared/links" %>
|
30
|
+
</div>
|
31
|
+
</div>
|
@@ -0,0 +1,63 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<div class="col-sm-6 ">
|
3
|
+
<h1>Edit your profile</h1>
|
4
|
+
|
5
|
+
<%= form_for(resource, :as => resource_name,
|
6
|
+
:url => registration_path(resource_name),
|
7
|
+
:html => { :method => :put, role: "form" }) do |f| %>
|
8
|
+
|
9
|
+
<%= devise_error_messages! %>
|
10
|
+
|
11
|
+
<div class="form-group">
|
12
|
+
<%= f.label :email %>
|
13
|
+
<div class="row">
|
14
|
+
<div class="col-sm-6">
|
15
|
+
<%= f.email_field :email, :autofocus => true, class: "form-control" %>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
|
21
|
+
<div class="row">
|
22
|
+
<div class="col-sm-6">
|
23
|
+
<p>Currently waiting confirmation for: <%= resource.unconfirmed_email %></p>
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
<% end %>
|
27
|
+
|
28
|
+
<div class="form-group">
|
29
|
+
<%= f.label :password %> <i><small>(leave blank if you don't want to change it)</small></i>
|
30
|
+
<div class="row">
|
31
|
+
<div class="col-sm-6">
|
32
|
+
<%= f.password_field :password, :autocomplete => "off", class: "form-control" %>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
|
37
|
+
<div class="form-group">
|
38
|
+
<%= f.label :password_confirmation %>
|
39
|
+
<div class="row">
|
40
|
+
<div class="col-sm-6">
|
41
|
+
<%= f.password_field :password_confirmation, class: "form-control" %>
|
42
|
+
</div>
|
43
|
+
</div>
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div class="form-group">
|
47
|
+
<%= f.label :current_password %> <i><small>(we need your current password to confirm your changes)</small></i>
|
48
|
+
<div class="row">
|
49
|
+
<div class="col-sm-6">
|
50
|
+
<%= f.password_field :current_password, class: "form-control" %>
|
51
|
+
</div>
|
52
|
+
</div>
|
53
|
+
</div>
|
54
|
+
|
55
|
+
<div class="row">
|
56
|
+
<div class="col-sm-6">
|
57
|
+
<%= f.submit "Update", class: "btn btn-primary" %> - <%= link_to "Cancel", inside_path %>
|
58
|
+
</div>
|
59
|
+
</div>
|
60
|
+
|
61
|
+
<% end %>
|
62
|
+
</div>
|
63
|
+
</div>
|
@@ -0,0 +1,49 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<div class="col-sm-6">
|
3
|
+
<h1>Sign up</h1>
|
4
|
+
|
5
|
+
<%= form_for(resource, :as => resource_name,
|
6
|
+
:url => registration_path(resource_name),
|
7
|
+
:html => { :role => "form" }) do |f| %>
|
8
|
+
|
9
|
+
<%= devise_error_messages! %>
|
10
|
+
|
11
|
+
<div class="form-group">
|
12
|
+
<%= f.label :email %>
|
13
|
+
<div class="row">
|
14
|
+
<div class="col-sm-6">
|
15
|
+
<%= f.email_field :email, class: "form-control" %>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<div class="form-group">
|
21
|
+
<div class="row">
|
22
|
+
<div class="col-sm-6">
|
23
|
+
<%= f.label :password %>
|
24
|
+
<%= f.password_field :password, class: "form-control" %>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<div class="form-group">
|
30
|
+
<div class="row">
|
31
|
+
<div class="col-sm-6">
|
32
|
+
<%= f.label :password_confirmation %>
|
33
|
+
<%= f.password_field :password_confirmation, class: "form-control" %>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
|
38
|
+
<div class="row">
|
39
|
+
<div class="col-sm-6">
|
40
|
+
<%= f.submit "Sign up", class: "btn btn-primary" %>
|
41
|
+
</div>
|
42
|
+
</div>
|
43
|
+
<% end %>
|
44
|
+
|
45
|
+
|
46
|
+
<%= render "devise/shared/links" %>
|
47
|
+
|
48
|
+
</div>
|
49
|
+
</div>
|
@@ -0,0 +1,49 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<div class="col-sm-6 ">
|
3
|
+
<h1>Sign in</h1>
|
4
|
+
|
5
|
+
<%= form_for(resource, :as => resource_name,
|
6
|
+
:url => session_path(resource_name),
|
7
|
+
role: "form") do |f| %>
|
8
|
+
|
9
|
+
<div class="form-group">
|
10
|
+
<%= f.label :email %>
|
11
|
+
<div class="row">
|
12
|
+
<div class="col-sm-6">
|
13
|
+
<%= f.text_field :email, :autofocus => true, class: "form-control" %>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<div class="form-group">
|
19
|
+
<%= f.label :password %>
|
20
|
+
<div class="row">
|
21
|
+
<div class="col-sm-6">
|
22
|
+
<%= f.password_field :password, class: "form-control" %>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
<% if devise_mapping.rememberable? -%>
|
30
|
+
<div class="form-group">
|
31
|
+
<div class="row">
|
32
|
+
<div class="col-sm-6">
|
33
|
+
<%= f.check_box :remember_me %> <%= f.label :remember_me %>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
<% end -%>
|
38
|
+
|
39
|
+
<div class="row">
|
40
|
+
<div class="col-sm-6">
|
41
|
+
<%= f.submit "Sign in", class: "btn btn-primary" %>
|
42
|
+
</div>
|
43
|
+
</div>
|
44
|
+
<% end %>
|
45
|
+
|
46
|
+
<%= render "devise/shared/links" %>
|
47
|
+
|
48
|
+
</div>
|
49
|
+
</div>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<div class="row shared-links">
|
2
|
+
<div class="col-sm-8">
|
3
|
+
<%- if controller_name != 'sessions' %>
|
4
|
+
<%= link_to "Sign in", new_session_path(resource_name) %><br />
|
5
|
+
<% end -%>
|
6
|
+
|
7
|
+
<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
|
8
|
+
<%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
|
9
|
+
<% end -%>
|
10
|
+
|
11
|
+
BRICK_ALLOW_SIGNUP_LINKS
|
12
|
+
|
13
|
+
<%- if devise_mapping.omniauthable? %>
|
14
|
+
<%- resource_class.omniauth_providers.each do |provider| %>
|
15
|
+
<%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %><br />
|
16
|
+
<% end -%>
|
17
|
+
<% end -%>
|
18
|
+
</div>
|
19
|
+
</div>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<div class="col-sm-6 ">
|
3
|
+
<h1>Resend confirmation instructions</h1>
|
4
|
+
|
5
|
+
<%= form_for(resource, :as => resource_name,
|
6
|
+
:url => confirmation_path(resource_name),
|
7
|
+
:html => { :method => :post, :role => "form" }) do |f| %>
|
8
|
+
|
9
|
+
<%= devise_error_messages! %>
|
10
|
+
|
11
|
+
<div class="form-group">
|
12
|
+
<%= f.label :username %>
|
13
|
+
<div class="row">
|
14
|
+
<div class="col-sm-6">
|
15
|
+
<%= f.text_field :username, :autofocus => true, class: "form-control" %>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<div class="row">
|
21
|
+
<div class="col-sm-6">
|
22
|
+
<%= f.submit "Resend confirmation instructions", class: "btn btn-primary" %>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
|
26
|
+
<% end %>
|
27
|
+
|
28
|
+
<%= render "devise/shared/links" %>
|
29
|
+
|
30
|
+
</div>
|
31
|
+
</div>
|
data/lib/railsbricks/assets/views/devise/devise_username/mailer/confirmation_instructions.html.erb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
<p>Welcome <%= @user.username.capitalize %>!</p>
|
2
|
+
|
3
|
+
<p>You need to confirm your account email through the link below:</p>
|
4
|
+
|
5
|
+
<p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @token) %></p>
|
6
|
+
<br/>
|
7
|
+
|
8
|
+
<p>
|
9
|
+
Thank you,<br/><br/>
|
10
|
+
Yourself<br/>
|
11
|
+
<%= link_to "Your URL", "#" %>
|
12
|
+
</p>
|
data/lib/railsbricks/assets/views/devise/devise_username/mailer/reset_password_instructions.html.erb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
<p>Hello <%= @resource.username.capitalize %>!</p>
|
2
|
+
|
3
|
+
<p>Someone has requested a link to change your password. You can do this through the link below.</p>
|
4
|
+
|
5
|
+
<p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @token) %></p>
|
6
|
+
|
7
|
+
<p>If you didn't request this, please ignore this email.</p>
|
8
|
+
<p>Your password won't change until you access the link above and create a new one.</p>
|
9
|
+
<br/>
|
10
|
+
|
11
|
+
<p>
|
12
|
+
Thank you,<br/><br/>
|
13
|
+
Yourself<br/>
|
14
|
+
<%= link_to "Your URL", "#" %>
|
15
|
+
</p>
|
@@ -0,0 +1,43 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<div class="col-sm-6 ">
|
3
|
+
<h1>Change your password</h1>
|
4
|
+
|
5
|
+
<%= form_for(resource, :as => resource_name,
|
6
|
+
:url => password_path(resource_name),
|
7
|
+
:html => { :method => :put, :role => "form" }) do |f| %>
|
8
|
+
|
9
|
+
<%= devise_error_messages! %>
|
10
|
+
|
11
|
+
<%= f.hidden_field :reset_password_token %>
|
12
|
+
|
13
|
+
<div class="form-group">
|
14
|
+
<%= f.label :password, "New password" %>
|
15
|
+
<div class="row">
|
16
|
+
<div class="col-sm-6">
|
17
|
+
<%= f.password_field :password, class: "form-control" %>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<div class="form-group">
|
23
|
+
<%= f.label :password_confirmation, "Confirm new password" %>
|
24
|
+
<div class="row">
|
25
|
+
<div class="col-sm-6">
|
26
|
+
<%= f.password_field :password_confirmation, class: "form-control" %>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
|
31
|
+
<div class="row">
|
32
|
+
<div class="col-sm-6">
|
33
|
+
<%= f.submit "Change my password", class: "btn btn-danger" %>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
|
37
|
+
|
38
|
+
<% end %>
|
39
|
+
|
40
|
+
<%= render "devise/shared/links" %>
|
41
|
+
|
42
|
+
</div>
|
43
|
+
</div>
|