-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
954 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
//= link_tree ../images | ||
//= link_directory ../stylesheets .css | ||
//= link application.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// This is a manifest file that'll be compiled into including all the files listed below. | ||
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically | ||
// be included in the compiled file accessible from http://example.com/assets/application.js | ||
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the | ||
// the compiled file. | ||
// | ||
//= require rails-ujs | ||
//= require jquery | ||
//= require twitter/bootstrap | ||
//= require turbolinks | ||
//= require_tree . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
jQuery(function() { | ||
$("a[rel~=popover], .has-popover").popover(); | ||
$("a[rel~=tooltip], .has-tooltip").tooltip(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* | ||
=require twitter-bootstrap-static/bootstrap | ||
Use Font Awesome icons (default) | ||
To use Glyphicons sprites instead of Font Awesome, replace with "require twitter-bootstrap-static/sprites" | ||
=require twitter-bootstrap-static/fontawesome | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
class ApplicationController < ActionController::Base | ||
before_action :authenticate_user! | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
class User < ApplicationRecord | ||
# Include default devise modules. Others available are: | ||
# :confirmable, :lockable, :timeoutable, :trackable and :omniauthable | ||
devise :database_authenticatable, :registerable, :confirmable, | ||
:recoverable, :rememberable, :validatable | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<h1><%= t('.resend_confirmation_instructions') %></h1> | ||
|
||
<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %> | ||
<%= bootstrap_devise_error_messages! %> | ||
|
||
<div class="form-group"> | ||
<%= f.label :email %> | ||
<%= f.email_field :email, autofocus: true, autocomplete: 'email', value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email), class: 'form-control' %> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<%= f.submit t('.resend_confirmation_instructions'), class: 'btn btn-primary' %> | ||
</div> | ||
<% end %> | ||
|
||
<%= render 'devise/shared/links' %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<h1><%= t('.change_your_password') %></h1> | ||
|
||
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %> | ||
<%= bootstrap_devise_error_messages! %> | ||
<%= f.hidden_field :reset_password_token %> | ||
|
||
<div class="form-group"> | ||
<%= f.label :password, t('.new_password') %> | ||
<%= f.password_field :password, autofocus: true, class: 'form-control' %> | ||
|
||
<% if @minimum_password_length %> | ||
<small class="form-text text-muted"><%= t('devise.shared.minimum_password_length', count: @minimum_password_length) %></small> | ||
<% end %> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<%= f.label :password_confirmation, t('.confirm_new_password') %> | ||
<%= f.password_field :password_confirmation, autocomplete: 'off', class: 'form-control' %> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<%= f.submit t('.change_my_password'), class: 'btn btn-primary' %> | ||
</div> | ||
<% end %> | ||
|
||
<%= render 'devise/shared/links' %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<h1><%= t('.forgot_your_password') %></h1> | ||
|
||
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %> | ||
<%= bootstrap_devise_error_messages! %> | ||
|
||
<div class="form-group"> | ||
<%= f.label :email %> | ||
<%= f.email_field :email, autofocus: true, autocomplete: 'email', class: 'form-control' %> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<%= f.submit t('.send_me_reset_password_instructions'), class: 'btn btn-primary' %> | ||
</div> | ||
<% end %> | ||
|
||
<%= render 'devise/shared/links' %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<h1><%= t('.title', resource: resource_name.to_s.humanize) %></h1> | ||
|
||
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %> | ||
<%= bootstrap_devise_error_messages! %> | ||
|
||
<div class="form-group"> | ||
<%= f.label :email %> | ||
<%= f.email_field :email, autofocus: true, autocomplete: 'email', class: 'form-control' %> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<%= f.label :password %> | ||
<%= f.password_field :password, autocomplete: 'new-password', class: 'form-control' %> | ||
|
||
<small class="form-text text-muted"><%= t('.leave_blank_if_you_don_t_want_to_change_it') %></small> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<%= f.label :password_confirmation %> | ||
<%= f.password_field :password_confirmation, autocomplete: 'new-password', class: 'form-control' %> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<%= f.label :current_password %> | ||
<%= f.password_field :current_password, autocomplete: 'current-password', class: 'form-control' %> | ||
|
||
<small class="form-text text-muted"><%= t('.we_need_your_current_password_to_confirm_your_changes') %></small> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<%= f.submit t('.update'), class: 'btn btn-primary' %> | ||
</div> | ||
<% end %> | ||
|
||
<p><%= t('.unhappy') %>? <%= link_to t('.cancel_my_account'), registration_path(resource_name), data: { confirm: t('.are_you_sure') }, method: :delete %>.</p> | ||
|
||
<%= link_to t('.back'), :back %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<h1><%= t('.sign_up') %></h1> | ||
|
||
<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %> | ||
<%= bootstrap_devise_error_messages! %> | ||
|
||
<div class="form-group"> | ||
<%= f.label :email %> | ||
<%= f.email_field :email, autofocus: true, autocomplete: 'email', class: 'form-control' %> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<%= f.label :password %> | ||
<%= f.password_field :password, autocomplete: 'current-password', class: 'form-control' %> | ||
|
||
<% if @minimum_password_length %> | ||
<small class="form-text text-muted"><%= t('devise.shared.minimum_password_length', count: @minimum_password_length) %></small> | ||
<% end %> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<%= f.label :password_confirmation %> | ||
<%= f.password_field :password_confirmation, autocomplete: 'current-password', class: 'form-control' %> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<%= f.submit t('.sign_up'), class: 'btn btn-primary' %> | ||
</div> | ||
<% end %> | ||
|
||
<%= render 'devise/shared/links' %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<h1><%= t('.sign_in') %></h1> | ||
|
||
<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %> | ||
<div class="form-group"> | ||
<%= f.label :email %> | ||
<%= f.email_field :email, autofocus: true, autocomplete: 'email', class: 'form-control' %> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<%= f.label :password %> | ||
<%= f.password_field :password, autocomplete: 'current-password', class: 'form-control' %> | ||
</div> | ||
|
||
<% if devise_mapping.rememberable? %> | ||
<div class="form-group form-check"> | ||
<%= f.check_box :remember_me, class: 'form-check-input' %> | ||
<%= f.label :remember_me, class: 'form-check-label' do %> | ||
<%= resource.class.human_attribute_name('remember_me') %> | ||
<% end %> | ||
</div> | ||
<% end %> | ||
|
||
<div class="form-group"> | ||
<%= f.submit t('.sign_in'), class: 'btn btn-primary' %> | ||
</div> | ||
<% end %> | ||
|
||
<%= render 'devise/shared/links' %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<div class="form-group"> | ||
<%- if controller_name != 'sessions' %> | ||
<%= link_to t(".sign_in"), new_session_path(resource_name) %><br /> | ||
<% end -%> | ||
|
||
<%- if devise_mapping.registerable? && controller_name != 'registrations' %> | ||
<%= link_to t(".sign_up"), new_registration_path(resource_name) %><br /> | ||
<% end -%> | ||
|
||
<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %> | ||
<%= link_to t(".forgot_your_password"), new_password_path(resource_name) %><br /> | ||
<% end -%> | ||
|
||
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %> | ||
<%= link_to t('.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 t('.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 t('.sign_in_with_provider', provider: OmniAuth::Utils.camelize(provider)), omniauth_authorize_path(resource_name, provider) %><br /> | ||
<% end -%> | ||
<% end -%> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<h1><%= t('.resend_unlock_instructions') %></h1> | ||
|
||
<%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %> | ||
<%= bootstrap_devise_error_messages! %> | ||
|
||
<div class="form-group"> | ||
<%= f.label :email %> | ||
<%= f.email_field :email, autofocus: true, autocomplete: 'email', class: 'form-control' %> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<%= f.submit t('.resend_unlock_instructions'), class: 'btn btn-primary'%> | ||
</div> | ||
<% end %> | ||
|
||
<%= render 'devise/shared/links' %> |
Oops, something went wrong.