Commit 39464ccd by thanhnd

fix review 20200415 1

parent 335c7328
Pipeline #576 canceled with stages
in 0 seconds
<p>Welcome <%= @email %>!</p> Welcome <%= @email %>!
<br>
<p>You can confirm your account email through the link below:</p> You can confirm your account email through the link below:
<br>
<p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %></p> <%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %>
<p>Hello <%= @email %>!</p> Hello <%= @email %>!
<br>
<% if @resource.try(:unconfirmed_email?) %> <% @resource.try(:unconfirmed_email?) ? %>
<p>We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.</p> We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.
<% else %> <br>
<p>We're contacting you to notify you that your email has been changed to <%= @resource.email %>.</p> <% : %>
<% end %> We're contacting you to notify you that your email has been changed to <%= @resource.email %>.
<br>
<% end %>
\ No newline at end of file
<p>Hello <%= @resource.email %>!</p> Hello <%= @resource.email %>!
<br>
<p>We're contacting you to notify you that your password has been changed.</p> We're contacting you to notify you that your password has been changed.
<p>Hello <%= @resource.email %>!</p> Hello <%= @resource.email %>!
<br>
<p>Someone has requested a link to change your password. You can do this through the link below.</p> Someone has requested a link to change your password. You can do this through the link below.
<br>
<p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p> <%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %>
<br>
<p>If you didn't request this, please ignore this email.</p> If you didn't request this, please ignore this email.
<p>Your password won't change until you access the link above and create a new one.</p> <br>
Your password won't change until you access the link above and create a new one.
<p>Hello <%= @resource.email %>!</p> Hello <%= @resource.email %>!
<br>
<p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p> Your account has been locked due to an excessive number of unsuccessful sign in attempts.
<br>
<p>Click the link below to unlock your account:</p> Click the link below to unlock your account:
<br>
<p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %></p> <%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %>
...@@ -2,12 +2,10 @@ ...@@ -2,12 +2,10 @@
<html> <html>
<head> <head>
<title>VenjobThanhnd</title> <title>VenjobThanhnd</title>
<%= csrf_meta_tags %> <%= csrf_meta_tags %>
<%= csp_meta_tag %> <%= csp_meta_tag %>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> <%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
</head> </head>
<body> <body>
...@@ -16,51 +14,55 @@ ...@@ -16,51 +14,55 @@
<a class="navbar-brand" href="#"><img src="https://www.w3schools.com/images/w3schools_green.jpg" alt="W3Schools.com" style="width:104px;height:142px;"></a> <a class="navbar-brand" href="#"><img src="https://www.w3schools.com/images/w3schools_green.jpg" alt="W3Schools.com" style="width:104px;height:142px;"></a>
<button class="navbar-toggler navbar-dark" type="button" data-toggle="collapse" data-target="#main-navigation"> <button class="navbar-toggler navbar-dark" type="button" data-toggle="collapse" data-target="#main-navigation">
</button> </button>
<div class="collapse navbar-collapse" id="main-navigation">
<ul class="navbar-nav"> <div class="collapse navbar-collapse" id="main-navigation">
<li class="nav-item"> <ul class="navbar-nav">
<a class="nav-link" href="#"><li><%= link_to 'Home', root_path %></li></a>
</li>
<% if !user_signed_in? %>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="#"><li><%= link_to 'Log In', new_user_session_path %></li></a> <a class="nav-link" href="#"><li><%= link_to 'Home', root_path %></li></a>
</li> </li>
<% if !user_signed_in? %>
<li class="nav-item">
<a class="nav-link" href="#"><li><%= link_to 'Log In', new_user_session_path %></li></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#"><li><%= link_to 'Sign Up', new_user_registration_path %></li></a>
</li>
<% end %>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="#"><li><%= link_to 'Sign Up', new_user_registration_path %></li></a> <a class="nav-link" href="#"><li><%= link_to 'Profile', edit_user_registration_path %></li></a>
</li> </li>
<% end %>
<li class="nav-item">
<a class="nav-link" href="#"><li><%= link_to 'Profile', edit_user_registration_path %></li></a>
</li>
<% if user_signed_in? %> <% if user_signed_in? %>
<li class="nav-item">
<a class="nav-link" href="#"><li><%= link_to 'Log out', destroy_user_session_path, method: :delete %></li></a>
</li>
<% end %>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="#"><li><%= link_to 'Log out', destroy_user_session_path, method: :delete %></li></a> <a class="nav-link" href="#"><li><%= link_to 'Favorites'%></li></a>
</li> </li>
<% end %>
<li class="nav-item">
<a class="nav-link" href="#"><li><%= link_to 'Favorites'%></li></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#"><li><%= link_to 'History'%></li></a>
</li>
</ul>
</div>
</nav>
<% if user_signed_in? %> <li class="nav-item">
<ul class="nav-item"> <a class="nav-link" href="#"><li><%= link_to 'History'%></li></a>
<label><%= current_user.email %></label> </li>
</ul> </ul>
<% end %> </div>
</nav>
<% if user_signed_in? %>
<ul class="nav-item">
<label><%= current_user.email %></label>
</ul>
<% end %>
<% if flash[:notice] %> <% if flash[:notice] %>
<p class="alert"><%= flash[:notice] %></p> <p class="alert"><%= flash[:notice] %></p>
<% end %> <% end %>
<% if flash[:alert] %> <% if flash[:alert] %>
<p class="alert"><%= flash[:alert] %></p> <p class="alert"><%= flash[:alert] %></p>
<% end %> <% end %>
<%= yield %> <%= yield %>
...@@ -71,7 +73,6 @@ ...@@ -71,7 +73,6 @@
<h6 class="text-uppercase font-weight-bold">Additional Information</h6> <h6 class="text-uppercase font-weight-bold">Additional Information</h6>
<p>ZIGExN VeNtura is a 100% invested company from Japan. Known as a symbol of a young and dynamic community in the IT field today, ZIGExN VeNtura operates in the field of software development and Internet services for the Japanese market. Being present in Vietnam market since the beginning of 2013, with the right steps from the Board of Directors and enthusiastic, creative and enthusiastic staff, ZIGExN VeNtura is growing and developing constantly.</p> <p>ZIGExN VeNtura is a 100% invested company from Japan. Known as a symbol of a young and dynamic community in the IT field today, ZIGExN VeNtura operates in the field of software development and Internet services for the Japanese market. Being present in Vietnam market since the beginning of 2013, with the right steps from the Board of Directors and enthusiastic, creative and enthusiastic staff, ZIGExN VeNtura is growing and developing constantly.</p>
</div> </div>
<div class="col-lg-4 col-md-4 col-sm-12"> <div class="col-lg-4 col-md-4 col-sm-12">
<h6 class="text-uppercase font-weight-bold">Contact</h6> <h6 class="text-uppercase font-weight-bold">Contact</h6>
<p>Floor 11, VINA BUILDING, 131 Xo Viet Nghe Tinh, Ward 17, Binh Thanh District, Ho Chi Minh City, VietNam <p>Floor 11, VINA BUILDING, 131 Xo Viet Nghe Tinh, Ward 17, Binh Thanh District, Ho Chi Minh City, VietNam
...@@ -82,9 +83,5 @@ ...@@ -82,9 +83,5 @@
<div class="footer-copyright text-center">© 2020 Copyright: zigexn.vn</div> <div class="footer-copyright text-center">© 2020 Copyright: zigexn.vn</div>
</footer> </footer>
</div> </div>
</body> </body>
</html> </html>
# frozen_string_literal: true # frozen_string_literal: true
class AddDeviseToUsers < ActiveRecord::Migration[6.0] class AddDeviseToUsers < ActiveRecord::Migration[6.0]
def self.up def change
change_table :users do |t| change_table :users do |t|
## Database authenticatable
t.string :email, null: false, default: "" t.string :email, null: false, default: ""
t.string :encrypted_password, null: false, default: "" t.string :encrypted_password, null: false, default: ""
## Recoverable
t.string :reset_password_token t.string :reset_password_token
t.datetime :reset_password_sent_at t.datetime :reset_password_sent_at
## Rememberable
t.datetime :remember_created_at t.datetime :remember_created_at
## Trackable
# t.integer :sign_in_count, default: 0, null: false
# t.datetime :current_sign_in_at
# t.datetime :last_sign_in_at
# t.string :current_sign_in_ip
# t.string :last_sign_in_ip
## Confirmable
# t.string :confirmation_token
# t.datetime :confirmed_at
# t.datetime :confirmation_sent_at
# t.string :unconfirmed_email # Only if using reconfirmable
## Lockable
# t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts
# t.string :unlock_token # Only if unlock strategy is :email or :both
# t.datetime :locked_at
# Uncomment below if timestamps were not included in your original model.
# t.timestamps null: false
end end
add_index :users, :email, unique: true add_index :users, :email, unique: true
add_index :users, :reset_password_token, unique: true add_index :users, :reset_password_token, unique: true
# add_index :users, :confirmation_token, unique: true
# add_index :users, :unlock_token, unique: true
end end
def self.down def change
# By default, we don't want to make any assumption about how to roll back a migration when your
# model already existed. Please edit below which fields you would like to remove in this migration.
raise ActiveRecord::IrreversibleMigration raise ActiveRecord::IrreversibleMigration
end end
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment