Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
ven-job
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Trịnh Hoàng Phúc
ven-job
Commits
0aeba9ec
Commit
0aeba9ec
authored
May 15, 2020
by
Trịnh Hoàng Phúc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Facebook authenticate
parent
b5ac3f15
Pipeline
#624
failed with stages
in 0 seconds
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
27 additions
and
17 deletions
+27
-17
app/models/user.rb
+2
-2
app/views/devise/sessions/new.html.erb
+1
-0
app/views/devise/shared/_links.html.erb
+8
-8
app/views/jobs/show.html.erb
+8
-1
app/views/layouts/application.html.erb
+1
-2
db/migrate/20200410070154_add_columns_to_users.rb
+0
-2
db/migrate/20200515033747_add_columns_provider_and_uid_to_users.rb
+6
-0
db/schema.rb
+1
-2
No files found.
app/models/user.rb
View file @
0aeba9ec
...
@@ -16,10 +16,10 @@ class User < ApplicationRecord
...
@@ -16,10 +16,10 @@ class User < ApplicationRecord
user
.
email
=
auth
.
info
.
email
user
.
email
=
auth
.
info
.
email
user
.
password
=
Devise
.
friendly_token
[
0
,
20
]
user
.
password
=
Devise
.
friendly_token
[
0
,
20
]
user
.
full_name
=
auth
.
info
.
name
# assuming the user model has a name
user
.
full_name
=
auth
.
info
.
name
# assuming the user model has a name
user
.
image
=
auth
.
info
.
image
# assuming the user model has an image
#
user.image = auth.info.image # assuming the user model has an image
# If you are using confirmable and the provider(s) you use validate emails,
# If you are using confirmable and the provider(s) you use validate emails,
# uncomment the line below to skip the confirmation emails.
# uncomment the line below to skip the confirmation emails.
#
user.skip_confirmation!
user
.
skip_confirmation!
end
end
end
end
...
...
app/views/devise/sessions/new.html.erb
View file @
0aeba9ec
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
<p
class=
"actions"
>
<p
class=
"actions"
>
<%=
f
.
submit
"Log in"
,
class:
"button"
%>
<%=
f
.
submit
"Log in"
,
class:
"button"
%>
<%=
link_to
"Sign in with Facebook"
,
user_facebook_omniauth_authorize_path
,
class:
"button"
%>
</p>
</p>
<%
end
%>
<%
end
%>
<p>
<p>
...
...
app/views/devise/shared/_links.html.erb
View file @
0aeba9ec
...
@@ -6,20 +6,20 @@
...
@@ -6,20 +6,20 @@
<%=
link_to
"Sign up"
,
new_registration_path
(
resource_name
)
%>
<br
/>
<%=
link_to
"Sign up"
,
new_registration_path
(
resource_name
)
%>
<br
/>
<%
end
%>
<%
end
%>
<%-
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
)
%>
<br />
<%=
link_to
"Forgot your password?"
,
new_password_path
(
resource_name
)
%>
<br />
<%
end
%>
<%
end
%>
-->
<%-
if
devise_mapping
.
confirmable?
&&
controller_name
!=
'confirmations'
%>
<
!--
<
%-
if
devise_mapping
.
confirmable?
&&
controller_name
!=
'confirmations'
%>
<%=
link_to
"Didn't receive confirmation instructions?"
,
new_user_confirmation_path
(
resource_name
)
%>
<br />
<%=
link_to
"Didn't receive confirmation instructions?"
,
new_user_confirmation_path
(
resource_name
)
%>
<br />
<%
end
%>
<%
end
%>
-->
<%-
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
)
%>
<br />
<%=
link_to
"Didn't receive unlock instructions?"
,
new_unlock_path
(
resource_name
)
%>
<br />
<%
end
%>
<%
end
%>
-->
<%-
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
)
%>
<br />
<%=
link_to
"Sign in with
#{
OmniAuth
::
Utils
.
camelize
(
provider
)
}
"
,
omniauth_authorize_path
(
resource_name
,
provider
)
%>
<br />
<%
end
%>
<%
end
%>
<%
end
%>
<%
end
%>
-->
app/views/jobs/show.html.erb
View file @
0aeba9ec
...
@@ -27,7 +27,14 @@
...
@@ -27,7 +27,14 @@
<div
id=
"content"
class=
"container content-area"
role=
"main"
>
<div
id=
"content"
class=
"container content-area"
role=
"main"
>
<div
class=
"job-overview-content row"
>
<div
class=
"job-overview-content row"
>
<div
class=
"job_listing-description job-overview col-md-9 col-sm-12"
>
<div
class=
"job_listing-description job-overview col-md-9 col-sm-12"
>
<h4>
Benefit
</h4>
<%=
raw
(
@job
.
benefit
)
%>
<h4>
Job requirements
</h4>
<%=
raw
(
@job
.
job_requirements
)
%>
<h4>
Job description
</h4>
<%=
raw
(
@job
.
job_description
)
%>
<%=
raw
(
@job
.
job_description
)
%>
<h4>
Other information
</h4>
<%=
raw
(
@job
.
other_information
)
%>
</div>
</div>
<div
class=
"job-meta col-md-3 col-sm-6 col-xs-12"
>
<div
class=
"job-meta col-md-3 col-sm-6 col-xs-12"
>
<aside
class=
"widget widget--job_listing"
>
<aside
class=
"widget widget--job_listing"
>
...
@@ -54,7 +61,7 @@
...
@@ -54,7 +61,7 @@
<ul>
<ul>
<li>
Name:
<%=
@job
.
company
.
title
%>
</li>
<li>
Name:
<%=
@job
.
company
.
title
%>
</li>
<li>
Address:
<%=
@job
.
company
.
address
%>
</li>
<li>
Address:
<%=
@job
.
company
.
address
%>
</li>
<li>
Description:
<%=
@job
.
company
.
description
%>
</li>
<li>
Description:
<%=
raw
(
@job
.
company
.
description
)
%>
</li>
</ul>
</ul>
</aside>
</aside>
<aside
class=
"widget widget--job_listing"
>
<aside
class=
"widget widget--job_listing"
>
...
...
app/views/layouts/application.html.erb
View file @
0aeba9ec
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
<button
type=
"submit"
id=
"searchsubmit"
class=
"searchform__submit searchform--header__submit"
><span
class=
"screen-reader-text"
>
Search
</button>
<button
type=
"submit"
id=
"searchsubmit"
class=
"searchform__submit searchform--header__submit"
><span
class=
"screen-reader-text"
>
Search
</button>
</form>
</form>
<div
class=
"nav-menu nav-menu--primary"
>
<div
class=
"nav-menu nav-menu--primary"
>
<ul
id=
"menu-main-menu"
class=
"nav-menu nav-menu--primary"
>
%>
<ul
id=
"menu-main-menu"
class=
"nav-menu nav-menu--primary"
>
<%
if
!
current_admin
%>
<%
if
!
current_admin
%>
<li
class=
"menu-item menu-item-type-post_type menu-item-object-page menu-item-99991208"
>
<li
class=
"menu-item menu-item-type-post_type menu-item-object-page menu-item-99991208"
>
<a
href=
"/jobs"
>
Find A Job
</a>
<a
href=
"/jobs"
>
Find A Job
</a>
...
@@ -77,7 +77,6 @@
...
@@ -77,7 +77,6 @@
</li>
</li>
<%
end
%>
<%
end
%>
<%
end
%>
<%
end
%>
<%=
link_to
"Sign in with Facebook"
,
user_facebook_omniauth_authorize_path
%>
</ul>
</ul>
</div>
</div>
</nav>
</nav>
...
...
db/migrate/20200410070154_add_columns_to_users.rb
View file @
0aeba9ec
...
@@ -3,7 +3,5 @@ class AddColumnsToUsers < ActiveRecord::Migration[6.0]
...
@@ -3,7 +3,5 @@ class AddColumnsToUsers < ActiveRecord::Migration[6.0]
add_column
:users
,
:full_name
,
:string
add_column
:users
,
:full_name
,
:string
add_column
:users
,
:image
,
:string
add_column
:users
,
:image
,
:string
add_column
:users
,
:cv
,
:string
add_column
:users
,
:cv
,
:string
add_column
:users
,
:provider
,
:string
add_column
:users
,
:uid
,
:string
end
end
end
end
db/migrate/20200515033747_add_columns_provider_and_uid_to_users.rb
0 → 100644
View file @
0aeba9ec
class
AddColumnsProviderAndUidToUsers
<
ActiveRecord
::
Migration
[
6.0
]
def
change
add_column
:users
,
:provider
,
:string
add_column
:users
,
:uid
,
:string
end
end
db/schema.rb
View file @
0aeba9ec
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
#
#
# It's strongly recommended that you check this file into your version control system.
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
2020_05_1
1_055632
)
do
ActiveRecord
::
Schema
.
define
(
version:
2020_05_1
5_033747
)
do
create_table
"admins"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4"
,
force: :cascade
do
|
t
|
create_table
"admins"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4"
,
force: :cascade
do
|
t
|
t
.
string
"email"
,
default:
""
,
null:
false
t
.
string
"email"
,
default:
""
,
null:
false
...
@@ -110,7 +110,6 @@ ActiveRecord::Schema.define(version: 2020_05_11_055632) do
...
@@ -110,7 +110,6 @@ ActiveRecord::Schema.define(version: 2020_05_11_055632) do
t
.
datetime
"created_at"
,
precision:
6
,
null:
false
t
.
datetime
"created_at"
,
precision:
6
,
null:
false
t
.
datetime
"updated_at"
,
precision:
6
,
null:
false
t
.
datetime
"updated_at"
,
precision:
6
,
null:
false
t
.
string
"full_name"
t
.
string
"full_name"
t
.
string
"image"
t
.
string
"cv"
t
.
string
"cv"
t
.
string
"provider"
t
.
string
"provider"
t
.
string
"uid"
t
.
string
"uid"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment