Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
venjob_nth
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
3
Merge Requests
3
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
Ngô Trung Hưng
venjob_nth
Commits
871a399c
Commit
871a399c
authored
Aug 18, 2020
by
Ngô Trung Hưng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add i18n
parent
4b9ef5ff
Pipeline
#924
canceled with stages
in 0 seconds
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
5 deletions
+21
-5
app/assets/javascripts/application.js
+3
-1
app/controllers/apply_job_controller.rb
+1
-1
app/models/applied_job.rb
+1
-0
app/views/applied_mailer/applied_job_mail_to.html.erb
+1
-1
app/views/apply_job/apply.html.erb
+3
-2
config/locales/en.yml
+6
-0
config/locales/vn.yml
+6
-0
No files found.
app/assets/javascripts/application.js
View file @
871a399c
...
@@ -16,5 +16,7 @@
...
@@ -16,5 +16,7 @@
//= require jquery.min
//= require jquery.min
//= require_tree .
//= require_tree .
toastr
.
options
=
{
toastr
.
options
=
{
'closeButton'
:
true
'closeButton'
:
true
,
'progressBar'
:
true
,
'timeOut'
:
10000
}
}
app/controllers/apply_job_controller.rb
View file @
871a399c
...
@@ -24,8 +24,8 @@ class ApplyJobController < ApplicationController
...
@@ -24,8 +24,8 @@ class ApplyJobController < ApplicationController
@apply_job
.
errors
.
full_messages
.
each
{
|
mess
|
errors
<<
"
#{
mess
}
<br>"
}
@apply_job
.
errors
.
full_messages
.
each
{
|
mess
|
errors
<<
"
#{
mess
}
<br>"
}
flash
[
:error
]
=
errors
.
join
(
'<br>'
).
html_safe
flash
[
:error
]
=
errors
.
join
(
'<br>'
).
html_safe
redirect_to
apply_path
(
job_id:
session
[
:job_id
])
redirect_to
apply_path
(
job_id:
session
[
:job_id
])
session
.
delete
(
:job_id
)
end
end
session
.
delete
(
:job_id
)
end
end
def
done
def
done
...
...
app/models/applied_job.rb
View file @
871a399c
...
@@ -8,4 +8,5 @@ class AppliedJob < ApplicationRecord
...
@@ -8,4 +8,5 @@ class AppliedJob < ApplicationRecord
validates
:name
,
:email
,
:cv
,
presence:
true
validates
:name
,
:email
,
:cv
,
presence:
true
validates
:name
,
:email
,
length:
{
in:
4
..
200
}
validates
:name
,
:email
,
length:
{
in:
4
..
200
}
validates
:email
,
format:
Devise
.
email_regexp
validates
:email
,
format:
Devise
.
email_regexp
validates_uniqueness_of
:user_id
,
scope: :job_id
,
message:
I18n
.
t
(
'apply_job.already_taken'
)
end
end
app/views/applied_mailer/applied_job_mail_to.html.erb
View file @
871a399c
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<p>
Thank you for applied with VenJOB. Your applied job's information is as follow:
</p>
<p>
Thank you for applied with VenJOB. Your applied job's information is as follow:
</p>
<span>
Job title:
<%=
@applied_job
.
job
.
name
%>
</span><br>
<span>
Job title:
<%=
@applied_job
.
job
.
name
%>
</span><br>
<span>
Location:
<%=
@applied_job
.
job
.
cities
.
map
(
&
:name
).
join
(
' '
)
%>
</span><br>
<span>
Location:
<%=
@applied_job
.
job
.
cities
.
map
(
&
:name
).
join
(
' '
)
%>
</span><br>
<span>
Company:
<%=
@applied_job
.
job
.
company
.
name
%>
</span><br>
<span>
Company:
<%=
@applied_job
.
job
.
company
.
name
%>
</span><br>
<br>
<span>
Name:
<%=
@applied_job
.
name
%>
</span><br>
<span>
Name:
<%=
@applied_job
.
name
%>
</span><br>
<span>
Email:
<%=
@applied_job
.
email
%>
</span><br>
<span>
Email:
<%=
@applied_job
.
email
%>
</span><br>
CV:
<%=
link_to
@applied_job
.
cv
.
identifier
,
root_url
(
@applied_job
.
cv
.
url
)
,
target:
'_blank'
%>
CV:
<%=
link_to
@applied_job
.
cv
.
identifier
,
root_url
(
@applied_job
.
cv
.
url
)
,
target:
'_blank'
%>
...
...
app/views/apply_job/apply.html.erb
View file @
871a399c
...
@@ -8,4 +8,5 @@
...
@@ -8,4 +8,5 @@
<%=
render
'form'
,
data_apply:
@data_apply
%>
<%=
render
'form'
,
data_apply:
@data_apply
%>
</div>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
<div
style=
"width: 100%; height: 25vh"
></div>
\ No newline at end of file
config/locales/en.yml
View file @
871a399c
...
@@ -123,3 +123,9 @@ en:
...
@@ -123,3 +123,9 @@ en:
confirm
:
'
Please
confirm
your
information'
confirm
:
'
Please
confirm
your
information'
applied
:
'
Applied'
applied
:
'
Applied'
title
:
'
List
Applied
Jobs'
title
:
'
List
Applied
Jobs'
already_taken
:
'
We
have
received
your
resume,
the
employer
will
contact
you
as
soon
as
possible.'
activerecord
:
attributes
:
applied_job
:
user_id
:
'
'
config/locales/vn.yml
View file @
871a399c
...
@@ -123,4 +123,9 @@ vi:
...
@@ -123,4 +123,9 @@ vi:
confirm
:
'
Vui
lòng
xác
nhận
lại
thông
tin
của
bạn'
confirm
:
'
Vui
lòng
xác
nhận
lại
thông
tin
của
bạn'
applied
:
'
Đã
ứng
tuyển'
applied
:
'
Đã
ứng
tuyển'
title
:
'
Danh
sách
công
việc
đã
ứng
tuyển'
title
:
'
Danh
sách
công
việc
đã
ứng
tuyển'
already_taken
:
'
Chúng
tôi
đã
tiếp
nhận
hồ
sơ
của
bạn,
nhà
tuyển
dụng
sẽ
liên
hệ
đến
bạn
trong
thời
gian
sớm
nhất.'
activerecord
:
attributes
:
applied_job
:
user_id
:
'
'
\ No newline at end of file
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