Commit 0921c4b8 by Mai Hoang Thai Ha

fixed Forgot password, new password, login page, profile, edit infomation

parent 60268529
...@@ -69,91 +69,3 @@ footer { ...@@ -69,91 +69,3 @@ footer {
// search // search
// latest-job
.latest-job {
.job-item {
font-size: 14px;
.job-title {
text-decoration: none;
color: black;
font-size: 20px;
font-weight: 500;
}
.job-caption {
line-height: 18px;
.job-company {
text-decoration: none;
font-size: 14px;
color: $gray-700;
}
.job-salary {
color: #008563;
margin: 0;
}
.job-locations {
ul {
list-style: none;
margin: 0 0 6px 0;
padding: 0;
color: $gray-700;
}
}
.job-desc {
overflow: hidden;
text-overflow: ellipsis;
line-height: 18px;
-webkit-line-clamp: 2;
max-height: 36px;
display: -webkit-box;
-webkit-box-orient: vertical;
}
}
}
}
// top_cities
.top_cities {
.city-item {
margin-bottom: 12px;
a {
font-size: 18px;
text-decoration: none;
color: #287ab9;
margin: 10px 0;
}
}
.all-cities-btn {
color: #287ab9;
font-size: 20px;
text-decoration: none;
}
.all-cities-btn:hover {
text-decoration: underline;
}
}
// top_industries
.top_industries {
.industry-item {
margin-bottom: 12px;
a {
font-size: 18px;
text-decoration: none;
color: #287ab9;
margin: 10px 0;
}
}
.all-industries-btn {
color: #287ab9;
font-size: 20px;
text-decoration: none;
}
.all-industries-btn:hover {
text-decoration: underline;
}
}
// cities list
...@@ -54,10 +54,6 @@ class AppliesController < ApplicationController ...@@ -54,10 +54,6 @@ class AppliesController < ApplicationController
params.require(:apply_job).permit(:user_name, :email, :cv, :job_id) params.require(:apply_job).permit(:user_name, :email, :cv, :job_id)
end end
def current_user
@current_user ||= User.first
end
def use_apply_job_session? def use_apply_job_session?
request.referer&.include?('confirm') && session[:apply_job].present? request.referer&.include?('confirm') && session[:apply_job].present?
end end
......
class UsersController < ApplicationController class UsersController < ApplicationController
before_action :logged_in_user # before_action :logged_in_user
def show def show
@user = User.find(params[:id]) @user = current_user
end end
end end
...@@ -78,21 +78,39 @@ Validator = function(options) { ...@@ -78,21 +78,39 @@ Validator = function(options) {
} }
} }
Validator.isRequired = function (selector) { Validator.isRequired = function (selector, message) {
return { return {
selector: selector, selector: selector,
test: function (value) { test: function (value) {
return value.trim() ? undefined : "This field can't be blank" return value.trim() ? undefined : message || "This field can't be blank"
} }
} }
} }
Validator.isEmail = function (selector) { Validator.isEmail = function (selector, message) {
return { return {
selector: selector, selector: selector,
test: function (value) { test: function (value) {
var regex = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; var regex = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return regex.test(value) ? undefined : 'Email invalid'; return regex.test(value) ? undefined : message || 'Email invalid';
}
}
}
Validator.minLenght = function (selector, min, message) {
return {
selector: selector,
test: function (value) {
return value.length >= min ? undefined : message || 'field too short';
}
}
}
Validator.isConfirmed = function (selector, getConfirmValue, message) {
return {
selector: selector,
test: function (value) {
return value == getConfirmValue() ? undefined : message || 'Incorrect password';
} }
} }
} }
......
...@@ -6,11 +6,11 @@ header.navbar.navbar-fixed-top.navbar-inverse ...@@ -6,11 +6,11 @@ header.navbar.navbar-fixed-top.navbar-inverse
ul.nav.navbar-nav.navbar-right.text-light ul.nav.navbar-nav.navbar-right.text-light
- if user_signed_in? - if user_signed_in?
li li
= link_to "Profile", current_user = link_to "Profile", user_profile_path
li li
= link_to "Log out", destroy_user_session_path, method: :delete = link_to "Log out", destroy_user_session_path, method: :delete
- else - else
li li
= link_to "Log in", new_user_session_path = link_to "Log in", login_path
li li
= link_to "Sign up", new_user_registration_path = link_to "Sign up", new_user_registration_path
<p>Hello <%= @resource.email %>!</p>
<p>Someone has requested a link to change your password. You can do this through the link below.</p>
<p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p>
<p>If you didn't request this, please ignore this email.</p>
<p>Your password won't change until you access the link above and create a new one.</p>
p
| Dear #{@resource.email}!
p You have a new password!
p Your password for signing in to VenJOB was recently changed. If you made this change, then we're all set.
p= link_to 'Change my password', reset_password_url(reset_password_token: @token)
p If you did not make this change, please reset your password to secure your account. Then reply to this email to notify us.
p Either way, feel free to reach out with any questions you might have. We're here to help.
p Best
\ No newline at end of file
- provide(:title, "Change password") - provide(:title, 'Change password')
.container .container
.row.justify-content-center .row.justify-content-center
...@@ -6,20 +6,33 @@ ...@@ -6,20 +6,33 @@
h2.text-center.my-5 h2.text-center.my-5
| Change your password | Change your password
= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f|
= render "users/shared/error_messages", resource: resource = render 'users/shared/error_messages', resource: resource
= f.hidden_field :reset_password_token = f.hidden_field :reset_password_token
.field .field.row.mb-5.form-group
= f.label :password, "New password", class: 'form-label' .col-4
br/ = f.label :password, 'New password', class: 'form-label'
- if @minimum_password_length .col-8
em = f.password_field :password, autofocus: true, autocomplete: 'new-password', class: 'form-control mb-2'
| (#{@minimum_password_length} characters minimum) span.form-msg
br/ .field.row.mb-5.form-group
= f.password_field :password, autofocus: true, autocomplete: "new-password", class: 'form-control mb-2' .col-4
.field = f.label :password_confirmation, 'Password Confirmation', class: 'form-label'
= f.label :password_confirmation, "Confirm new password", class: 'form-label' .col-8
br/ = f.password_field :password_confirmation, autocomplete: 'new-password', class: 'form-control mb-2'
= f.password_field :password_confirmation, autocomplete: "new-password", class: 'form-control mb-2' span.form-msg
.actions .actions.row.justify-content-end
= f.submit "Change my password", class: 'btn btn-primary w-100 my-4' .col-8
= render "users/shared/links" = f.submit 'Change my password', class: 'btn btn-primary w-50 my-4', data: { disable_with: false }
javascript:
Validator({
form: '#new_user',
errorSelector: '.form-msg',
rules: [
Validator.isRequired('#user_password'),
Validator.minLenght('#user_password', 6, 'Use 6 characters or more for your password'),
Validator.isRequired('#user_password_confirmation'),
Validator.isConfirmed('#user_password_confirmation', function() {
return document.querySelector('#new_user #user_password').value;
}, 'Those passwords didn’t match.'),
]
})
- provide(:title, "Forgot password") - provide(:title, 'Forgot password')
.container .container
.row.justify-content-center .row.justify-content-center
.col-6 .col-6
h2.text-center.my-5 h2.text-center.my-5
| Forgot your password? | Forgot password
= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f|
= render "users/shared/error_messages", resource: resource = render 'users/shared/error_messages', resource: resource
.field .field.row.form-group.mb-4
= f.label :email, class: 'form-label' .col-2
br/ = f.label :email, class: 'form-label'
= f.email_field :email, autofocus: true, autocomplete: "email", class: 'form-control mb-2' .col-10
.actions = f.email_field :email, autofocus: true, autocomplete: 'email', class: 'form-control mb-2'
= f.submit "Send me reset password instructions", class: 'btn btn-primary w-100 my-4' span.form-msg
= render "users/shared/links" .actions.row.justify-content-end
.col-10.d-flex.justify-content-center
= f.submit 'Confirm your email', class: 'btn btn-primary w-75 my-4', data: { disable_with: false }
javascript:
Validator({
form: '#new_user',
errorSelector: '.form-msg',
rules: [
Validator.isRequired('#user_email'),
Validator.isEmail('#user_email')
]
})
- provide(:title, "Edit profile") - provide(:title, 'Edit profile')
.container .container
.row.justify-content-center .row.justify-content-center
.col-6 .col-8
h2.text-center.my-5 h2.text-center.my-5
| Edit | Edit
= resource_name.to_s.humanize = resource_name.to_s.humanize
= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| = form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f|
= render "users/shared/error_messages", resource: resource = render 'users/shared/error_messages', resource: resource
.field .field.row.mb-2.form-group
= f.label :email, class: 'form-label' .col-3
br = f.label :email, class: 'form-label'
= f.email_field :email, autofocus: true, autocomplete: "email", class: 'form-control mb-2' .col-9
.field = f.email_field :email, autofocus: true, autocomplete: 'email', class: 'form-control mb-2'
span.form-msg
.field.row.mb-2.form-group
- if devise_mapping.confirmable? && resource.pending_reconfirmation? - if devise_mapping.confirmable? && resource.pending_reconfirmation?
div div
| Currently waiting confirmation for: | Currently waiting confirmation for:
= resource.unconfirmed_email = resource.unconfirmed_email
.field .field.row.mb-2.form-group
= f.label :name, class: 'form-label' .col-3
br = f.label :name, class: 'form-label'
= f.text_field :name, autofocus: true, autocomplete: "name", class: 'form-control mb-2' .col-9
.field = f.text_field :name, autofocus: true, autocomplete: 'name', class: 'form-control mb-2'
= f.label :address, class: 'form-label' span.form-msg
br .field.row.mb-2.form-group
= f.text_field :address, autofocus: true, autocomplete: "address", class: 'form-control mb-2' .col-3
.field = f.label :address, class: 'form-label'
= f.label :phone, class: 'form-label' .col-9
br = f.text_field :address, autofocus: true, autocomplete: 'address', class: 'form-control mb-2'
= f.text_field :phone, autofocus: true, autocomplete: "phone", class: 'form-control mb-2' span.form-msg
.field .field.row.mb-2.form-group
= f.label :password, class: 'form-label' .col-3
i = f.label :phone, class: 'form-label'
| (leave blank if you don't want to change it) .col-9
br = f.text_field :phone, autofocus: true, autocomplete: 'phone', class: 'form-control mb-2'
= f.password_field :password, autocomplete: "new-password", class: 'form-control mb-2' span.form-msg
- if @minimum_password_length .row.my-4.justify-content-end
em .col-9
= @minimum_password_length hr
| characters minimum p
.field |(leave password blank if you don't want to change it)
= f.label :password_confirmation, class: 'form-label'
br .field.row.mb-2.form-group
= f.password_field :password_confirmation, autocomplete: "new-password", class: 'form-control mb-2' .col-3
.field = f.label :password, class: 'form-label'
= f.label :current_password, class: 'form-label' .col-9
i = f.password_field :password, autocomplete: 'new-password', class: 'form-control mb-2'
| (we need your current password to confirm your changes) span.form-msg
br .field.row.mb-2.form-group
= f.password_field :current_password, autocomplete: "current-password", class: 'form-control mb-2' .col-3
.actions = f.label :password_confirmation, class: 'form-label'
= f.submit "Done", class: "btn btn-primary w-100 my-4" .col-9
= f.password_field :password_confirmation, autocomplete: 'new-password', class: 'form-control mb-2'
span.form-msg
.field.row.mb-2.form-group
.col-3
= f.label :current_password, class: 'form-label'
.col-9
= f.password_field :current_password, autocomplete: 'current-password', class: 'form-control mb-2'
span.form-msg
.actions.row.justify-content-end
.col-9
= f.submit 'Done', class: 'btn btn-primary w-50 my-4', data: { disable_with: false }
hr hr
h3 h3
| Delete my account | Delete my account
p p
| Click the button below to delete account | Click the button below to delete account
= button_to "Delete", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete, class: "btn btn-primary w-100 my-4" = button_to 'Delete', registration_path(resource_name), data: { confirm: 'Are you sure?' }, method: :delete, class: 'btn btn-primary w-100 my-4'
= link_to "Home", :back = link_to 'Home', :back
\ No newline at end of file
javascript:
Validator({
form: '#edit_user',
errorSelector: '.form-msg',
rules: [
Validator.isRequired('#user_email'),
Validator.isEmail('#user_email'),
Validator.isRequired('#user_name'),
Validator.isRequired('#user_address'),
Validator.isRequired('#user_phone'),
Validator.isRequired('#user_current_password'),
Validator.isConfirmed('#user_password_confirmation', function() {
return document.querySelector('#new_user #user_password').value;
}, 'Those passwords didn’t match.'),
]
})
\ No newline at end of file
- provide(:title, "Sign Up") - provide(:title, 'Sign Up')
.container .container
.row.justify-content-center .row.justify-content-center
...@@ -6,23 +6,23 @@ ...@@ -6,23 +6,23 @@
h2.text-center.my-5 h2.text-center.my-5
| Sign up | Sign up
= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| = form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
= render "users/shared/error_messages", resource: resource = render 'users/shared/error_messages', resource: resource
.field .field
= f.label :email, class: 'form-label' = f.label :email, class: 'form-label'
br br
= f.email_field :email, autofocus: true, autocomplete: "email", class: 'form-control mb-2' = f.email_field :email, autofocus: true, autocomplete: 'email', class: 'form-control mb-2'
.field .field
= f.label :name, class: 'form-label' = f.label :name, class: 'form-label'
br br
= f.text_field :name, autofocus: true, autocomplete: "name", class: 'form-control mb-2' = f.text_field :name, autofocus: true, autocomplete: 'name', class: 'form-control mb-2'
.field .field
= f.label :address, class: 'form-label' = f.label :address, class: 'form-label'
br br
= f.text_field :address, autofocus: true, autocomplete: "address", class: 'form-control mb-2' = f.text_field :address, autofocus: true, autocomplete: 'address', class: 'form-control mb-2'
.field .field
= f.label :phone, class: 'form-label' = f.label :phone, class: 'form-label'
br br
= f.text_field :phone, autofocus: true, autocomplete: "phone", class: 'form-control mb-2' = f.text_field :phone, autofocus: true, autocomplete: 'phone', class: 'form-control mb-2'
.field .field
= f.label :password, class: 'form-label' = f.label :password, class: 'form-label'
- if @minimum_password_length - if @minimum_password_length
...@@ -31,11 +31,11 @@ ...@@ -31,11 +31,11 @@
= @minimum_password_length = @minimum_password_length
| characters minimum) | characters minimum)
br br
= f.password_field :password, autocomplete: "new-password", class: 'form-control mb-2' = f.password_field :password, autocomplete: 'new-password', class: 'form-control mb-2'
.field .field
= f.label :password_confirmation, class: 'form-label' = f.label :password_confirmation, class: 'form-label'
br br
= f.password_field :password_confirmation, autocomplete: "new-password", class: 'form-control mb-2' = f.password_field :password_confirmation, autocomplete: 'new-password', class: 'form-control mb-2'
.actions .actions
= f.submit "Sign up", class: "btn btn-primary w-100 my-5" = f.submit 'Sign up', class: 'btn btn-primary w-100 my-5'
= render "users/shared/links" = render 'users/shared/links'
\ No newline at end of file \ No newline at end of file
- provide(:title, 'Log in')
.container .container
.row.justify-content-center .row.justify-content-center
.col-6 .col-6
h2.text-center.my-5 h2.text-center.my-5
| Log in | Log in
= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| = form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
.field .field.row.form-group.mb-4
= f.label :email, class: 'form-label' .col-2
br = f.label :email, class: 'form-label'
= f.email_field :email, autofocus: true, autocomplete: "email", class: 'form-control mb-2' .col-10
.field = f.email_field :email, autofocus: true, autocomplete: 'email', class: 'form-control mb-2'
= f.label :password, class: 'form-label' span.form-msg
br .field.row.form-group.mb-4
= f.password_field :password, autocomplete: "current-password", class: 'form-control mb-2' .col-2
- if devise_mapping.rememberable? = f.label :password, class: 'form-label'
.field .col-10
= f.check_box :remember_me = f.password_field :password, autocomplete: 'current-password', class: 'form-control mb-2'
= f.label :remember_me, class: 'form-label' span.form-msg
.actions - if devise_mapping.rememberable?
= f.submit "Log in", class: "btn btn-primary w-100 my-5" .field
= render "users/shared/links" = f.check_box :remember_me
\ No newline at end of file = f.label :remember_me, class: 'form-label mx-2'
- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations'
= link_to 'Forgot password?', forgot_password_path, class: 'text-decoration-none'
.actions.row.justify-content-end
.col-10.d-flex.justify-content-around
= f.submit 'Log in', class: 'btn btn-primary w-25', data: { disable_with: false }
= link_to 'Sign up', new_registration_path(resource_name), class: 'text-decoration-none w-25 btn btn-secondary'
javascript:
Validator({
form: '#new_user',
errorSelector: '.form-msg',
rules: [
Validator.isRequired('#user_email'),
Validator.isEmail('#user_email'),
Validator.isRequired('#user_password')
]
})
- if controller_name != 'sessions' - if controller_name != 'sessions'
= link_to "Log in", new_session_path(resource_name), class: 'text-decoration-none' = link_to 'Log in', new_session_path(resource_name), class: 'text-decoration-none'
br/ br/
- if devise_mapping.registerable? && controller_name != 'registrations' - if devise_mapping.registerable? && controller_name != 'registrations'
= link_to "Sign up", new_registration_path(resource_name), class: 'text-decoration-none' = link_to 'Sign up', new_registration_path(resource_name), class: 'text-decoration-none btn btn-primary'
br/ br/
- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' - if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations'
= link_to "Forgot your password?", new_password_path(resource_name), class: 'text-decoration-none' = link_to 'Forgot your password?', new_password_path(resource_name), class: 'text-decoration-none'
br/ br/
- if devise_mapping.confirmable? && controller_name != 'confirmations' - if devise_mapping.confirmable? && controller_name != 'confirmations'
= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name), class: 'text-decoration-none' = link_to 'Didn't receive confirmation instructions?', new_confirmation_path(resource_name), class: 'text-decoration-none'
br/ br/
- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' - if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks'
= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name), class: 'text-decoration-none' = link_to 'Didn't receive unlock instructions?', new_unlock_path(resource_name), class: 'text-decoration-none'
br/ br/
- if devise_mapping.omniauthable? - if devise_mapping.omniauthable?
- resource_class.omniauth_providers.each do |provider| - resource_class.omniauth_providers.each do |provider|
= link_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider), method: :post, class: 'text-decoration-none' = link_to 'Sign in with #{OmniAuth::Utils.camelize(provider)}', omniauth_authorize_path(resource_name, provider), method: :post, class: 'text-decoration-none'
br/ br/
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
.container .container
.main-body .main-body
/! Breadcrumb /! Breadcrumb
nav.main-breadcrumb aria-label="breadcrumb" nav.main-breadcrumb aria-label='breadcrumb'
ol.breadcrumb ol.breadcrumb
li.breadcrumb-item li.breadcrumb-item
= link_to 'Home', root_path = link_to 'Home', root_path
li.breadcrumb-item li.breadcrumb-item
= link_to 'User', '#' = link_to 'User', '#'
li.breadcrumb-item.active aria-current="page" User Profile li.breadcrumb-item.active aria-current='page' User Profile
/! /Breadcrumb /! /Breadcrumb
.row.gutters-sm .row.gutters-sm
.col-md-4.mb-3 .col-md-4.mb-3
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
.card-body .card-body
.d-flex.flex-column.align-items-center.text-center .d-flex.flex-column.align-items-center.text-center
= gravatar_for @user = gravatar_for @user
/ img.rounded-circle alt="Admin" src="https://bootdey.com/img/Content/avatar/avatar7.png" width="150" / / img.rounded-circle alt='Admin' src='https://bootdey.com/img/Content/avatar/avatar7.png' width='150' /
.mt-3 .mt-3
h4 h4
= @user.name = @user.name
...@@ -30,36 +30,36 @@ ...@@ -30,36 +30,36 @@
ul.list-group.list-group-flush ul.list-group.list-group-flush
li.list-group-item.d-flex.justify-content-between.align-items-center.flex-wrap li.list-group-item.d-flex.justify-content-between.align-items-center.flex-wrap
h6.mb-0 h6.mb-0
svg.feather.feather-globe.mr-2.icon-inline fill="none" height="24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewbox=("0 0 24 24") width="24" xmlns="http://www.w3.org/2000/svg" svg.feather.feather-globe.mr-2.icon-inline fill='none' height='24' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewbox=('0 0 24 24') width='24' xmlns='http://www.w3.org/2000/svg'
circle cx="12" cy="12" r="10" circle cx='12' cy='12' r='10'
line x1="2" x2="22" y1="12" y2="12" line x1='2' x2='22' y1='12' y2='12'
path d=("M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z") path d=('M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z')
| Website | Website
span.text-secondary none span.text-secondary none
li.list-group-item.d-flex.justify-content-between.align-items-center.flex-wrap li.list-group-item.d-flex.justify-content-between.align-items-center.flex-wrap
h6.mb-0 h6.mb-0
svg.feather.feather-github.mr-2.icon-inline fill="none" height="24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewbox=("0 0 24 24") width="24" xmlns="http://www.w3.org/2000/svg" svg.feather.feather-github.mr-2.icon-inline fill='none' height='24' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewbox=('0 0 24 24') width='24' xmlns='http://www.w3.org/2000/svg'
path d=("M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22") path d=('M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22')
| Github | Github
span.text-secondary none span.text-secondary none
li.list-group-item.d-flex.justify-content-between.align-items-center.flex-wrap li.list-group-item.d-flex.justify-content-between.align-items-center.flex-wrap
h6.mb-0 h6.mb-0
svg.feather.feather-twitter.mr-2.icon-inline.text-info fill="none" height="24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewbox=("0 0 24 24") width="24" xmlns="http://www.w3.org/2000/svg" svg.feather.feather-twitter.mr-2.icon-inline.text-info fill='none' height='24' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewbox=('0 0 24 24') width='24' xmlns='http://www.w3.org/2000/svg'
path d=("M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z") path d=('M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z')
| Twitter | Twitter
span.text-secondary none span.text-secondary none
li.list-group-item.d-flex.justify-content-between.align-items-center.flex-wrap li.list-group-item.d-flex.justify-content-between.align-items-center.flex-wrap
h6.mb-0 h6.mb-0
svg.feather.feather-instagram.mr-2.icon-inline.text-danger fill="none" height="24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewbox=("0 0 24 24") width="24" xmlns="http://www.w3.org/2000/svg" svg.feather.feather-instagram.mr-2.icon-inline.text-danger fill='none' height='24' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewbox=('0 0 24 24') width='24' xmlns='http://www.w3.org/2000/svg'
rect height="20" rx="5" ry="5" width="20" x="2" y="2" rect height='20' rx='5' ry='5' width='20' x='2' y='2'
path d=("M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z") path d=('M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z')
line x1="17.5" x2="17.51" y1="6.5" y2="6.5" line x1='17.5' x2='17.51' y1='6.5' y2='6.5'
| Instagram | Instagram
span.text-secondary none span.text-secondary none
li.list-group-item.d-flex.justify-content-between.align-items-center.flex-wrap li.list-group-item.d-flex.justify-content-between.align-items-center.flex-wrap
h6.mb-0 h6.mb-0
svg.feather.feather-facebook.mr-2.icon-inline.text-primary fill="none" height="24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewbox=("0 0 24 24") width="24" xmlns="http://www.w3.org/2000/svg" svg.feather.feather-facebook.mr-2.icon-inline.text-primary fill='none' height='24' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewbox=('0 0 24 24') width='24' xmlns='http://www.w3.org/2000/svg'
path d=("M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z") path d=('M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z')
| Facebook | Facebook
span.text-secondary none span.text-secondary none
.col-md-8 .col-md-8
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
hr/ hr/
.row .row
.col-sm-12 .col-sm-12
= link_to 'Edit profile', edit_user_registration_path, class:'btn btn-info' = link_to 'Edit profile', edit_profile_path, class:'btn btn-info'
.row.gutters-sm .row.gutters-sm
.col-sm-6.mb-3 .col-sm-6.mb-3
.card.h-100 .card.h-100
...@@ -102,20 +102,20 @@ ...@@ -102,20 +102,20 @@
span.d-block.m-auto span.d-block.m-auto
| Project Status | Project Status
small Skill small Skill
.progress.mb-3 style=("height: 5px") .progress.mb-3 style=('height: 5px')
.progress-bar.bg-primary aria-valuemax="100" aria-valuemin="0" aria-valuenow="80" role="progressbar" style=("width: 80%") .progress-bar.bg-primary aria-valuemax='100' aria-valuemin='0' aria-valuenow='80' role='progressbar' style=('width: 80%')
small Skill small Skill
.progress.mb-3 style=("height: 5px") .progress.mb-3 style=('height: 5px')
.progress-bar.bg-primary aria-valuemax="100" aria-valuemin="0" aria-valuenow="72" role="progressbar" style=("width: 72%") .progress-bar.bg-primary aria-valuemax='100' aria-valuemin='0' aria-valuenow='72' role='progressbar' style=('width: 72%')
small Skill small Skill
.progress.mb-3 style=("height: 5px") .progress.mb-3 style=('height: 5px')
.progress-bar.bg-primary aria-valuemax="100" aria-valuemin="0" aria-valuenow="89" role="progressbar" style=("width: 89%") .progress-bar.bg-primary aria-valuemax='100' aria-valuemin='0' aria-valuenow='89' role='progressbar' style=('width: 89%')
small Skill small Skill
.progress.mb-3 style=("height: 5px") .progress.mb-3 style=('height: 5px')
.progress-bar.bg-primary aria-valuemax="100" aria-valuemin="0" aria-valuenow="55" role="progressbar" style=("width: 55%") .progress-bar.bg-primary aria-valuemax='100' aria-valuemin='0' aria-valuenow='55' role='progressbar' style=('width: 55%')
small Skill small Skill
.progress.mb-3 style=("height: 5px") .progress.mb-3 style=('height: 5px')
.progress-bar.bg-primary aria-valuemax="100" aria-valuemin="0" aria-valuenow="66" role="progressbar" style=("width: 66%") .progress-bar.bg-primary aria-valuemax='100' aria-valuemin='0' aria-valuenow='66' role='progressbar' style=('width: 66%')
.col-sm-6.mb-3 .col-sm-6.mb-3
.card.h-100 .card.h-100
.card-body .card-body
...@@ -124,17 +124,17 @@ ...@@ -124,17 +124,17 @@
span.d-block.m-auto span.d-block.m-auto
| Project Status | Project Status
small Skill small Skill
.progress.mb-3 style=("height: 5px") .progress.mb-3 style=('height: 5px')
.progress-bar.bg-primary aria-valuemax="100" aria-valuemin="0" aria-valuenow="80" role="progressbar" style=("width: 80%") .progress-bar.bg-primary aria-valuemax='100' aria-valuemin='0' aria-valuenow='80' role='progressbar' style=('width: 80%')
small Skill small Skill
.progress.mb-3 style=("height: 5px") .progress.mb-3 style=('height: 5px')
.progress-bar.bg-primary aria-valuemax="100" aria-valuemin="0" aria-valuenow="72" role="progressbar" style=("width: 72%") .progress-bar.bg-primary aria-valuemax='100' aria-valuemin='0' aria-valuenow='72' role='progressbar' style=('width: 72%')
small Skill small Skill
.progress.mb-3 style=("height: 5px") .progress.mb-3 style=('height: 5px')
.progress-bar.bg-primary aria-valuemax="100" aria-valuemin="0" aria-valuenow="89" role="progressbar" style=("width: 89%") .progress-bar.bg-primary aria-valuemax='100' aria-valuemin='0' aria-valuenow='89' role='progressbar' style=('width: 89%')
small Skill small Skill
.progress.mb-3 style=("height: 5px") .progress.mb-3 style=('height: 5px')
.progress-bar.bg-primary aria-valuemax="100" aria-valuemin="0" aria-valuenow="55" role="progressbar" style=("width: 55%") .progress-bar.bg-primary aria-valuemax='100' aria-valuemin='0' aria-valuenow='55' role='progressbar' style=('width: 55%')
small Skill small Skill
.progress.mb-3 style=("height: 5px") .progress.mb-3 style=('height: 5px')
.progress-bar.bg-primary aria-valuemax="100" aria-valuemin="0" aria-valuenow="66" role="progressbar" style=("width: 66%") .progress-bar.bg-primary aria-valuemax='100' aria-valuemin='0' aria-valuenow='66' role='progressbar' style=('width: 66%')
...@@ -24,7 +24,7 @@ Devise.setup do |config| ...@@ -24,7 +24,7 @@ Devise.setup do |config|
# Configure the e-mail address which will be shown in Devise::Mailer, # Configure the e-mail address which will be shown in Devise::Mailer,
# note that it will be overwritten if you use your own mailer class # note that it will be overwritten if you use your own mailer class
# with default "from" parameter. # with default "from" parameter.
config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com' config.mailer_sender = 'user@venjob.com'
# Configure the class responsible to send e-mails. # Configure the class responsible to send e-mails.
# config.mailer = 'Devise::Mailer' # config.mailer = 'Devise::Mailer'
......
Rails.application.routes.draw do Rails.application.routes.draw do
devise_for :users devise_for :users
devise_scope :user do
get '/login', to: 'devise/sessions#new', as: :login
get '/my/info', to: 'devise/registrations#edit', as: :edit_profile
get '/forgot_password', to: 'devise/passwords#new', as: :forgot_password
get '/reset_password', to: 'devise/passwords#edit', as: :reset_password
end
root 'top#index' root 'top#index'
resources :cities, only: %i[index] resources :cities, only: %i[index]
...@@ -7,8 +13,7 @@ Rails.application.routes.draw do ...@@ -7,8 +13,7 @@ Rails.application.routes.draw do
get '/jobs/:model/:slug', to: 'jobs#index', as: :job_list get '/jobs/:model/:slug', to: 'jobs#index', as: :job_list
resources :jobs, only: %i[index show] resources :jobs, only: %i[index show]
resources :users, only: %i[index show] get '/my', to: 'users#show', as: :user_profile
get '/apply', to: 'applies#new', as: :apply_job get '/apply', to: 'applies#new', as: :apply_job
post '/confirm', to: 'applies#confirm', as: :confirm_job post '/confirm', to: 'applies#confirm', as: :confirm_job
......
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