Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
veNJOB
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
2
Merge Requests
2
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
Thanh Hung Pham
veNJOB
Commits
37e1a7ba
Commit
37e1a7ba
authored
Jul 11, 2017
by
Thanh Hung Pham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Send mail apply complete
parent
abd34948
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
29 additions
and
13 deletions
+29
-13
app/controllers/jobs_controller.rb
+6
-4
app/mailers/apply_mailer.rb
+2
-1
app/views/apply_mailer/apply_mail.html.erb
+5
-5
app/views/apply_mailer/apply_mail.text.erb
+12
-1
app/views/jobs/apply.html.erb
+1
-0
app/views/jobs/confirm.html.erb
+1
-0
app/views/jobs/detail.html.erb
+2
-2
No files found.
app/controllers/jobs_controller.rb
View file @
37e1a7ba
...
@@ -10,19 +10,21 @@ class JobsController < ApplicationController
...
@@ -10,19 +10,21 @@ class JobsController < ApplicationController
end
end
def
apply
def
apply
@job_id
=
params
[
:job_id
]
end
end
def
confirm
def
confirm
@fullname
=
params
[
'fullname'
]
@fullname
=
params
[
:fullname
]
@email
=
params
[
'email'
]
@email
=
params
[
:email
]
@job_id
=
params
[
:job_id
]
end
end
def
done
def
done
@email
=
params
[
:email
]
@email
=
params
[
:email
]
@fullname
=
params
[
:fullname
]
@fullname
=
params
[
:fullname
]
@cv_link
=
'link to download'
@cv_link
=
'link to download'
ApplyMailer
.
apply_mail
(
@email
,
@fullname
,
@cv_link
).
deliver
@job
=
Job
.
find
(
params
[
:job_id
])
ApplyMailer
.
apply_mail
(
@email
,
@fullname
,
@cv_link
,
@job
).
deliver
end
end
def
show
def
show
...
...
app/mailers/apply_mailer.rb
View file @
37e1a7ba
class
ApplyMailer
<
ApplicationMailer
class
ApplyMailer
<
ApplicationMailer
default
from:
'hungpt@zigexn.vn'
default
from:
'hungpt@zigexn.vn'
def
apply_mail
(
email
,
fullname
,
cv_link
)
def
apply_mail
(
email
,
fullname
,
cv_link
,
job
)
@email
=
email
@email
=
email
@fullname
=
fullname
@fullname
=
fullname
@cv_link
=
cv_link
@cv_link
=
cv_link
@job
=
job
mail
(
to:
email
,
subject:
'Thank you for apply with VeNJOB'
)
mail
(
to:
email
,
subject:
'Thank you for apply with VeNJOB'
)
end
end
end
end
app/views/apply_mailer/apply_mail.html.erb
View file @
37e1a7ba
...
@@ -6,14 +6,14 @@
...
@@ -6,14 +6,14 @@
<body>
<body>
<p>
Dear
<%=
@fullname
%>
</p>
<p>
Dear
<%=
@fullname
%>
</p>
<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>
<p>
Job title:
<
Job
title
>
</p>
<p>
Job title:
<
%=
@job
.
name
%
>
</p>
<p>
Location:
<
Job
location
>
</p>
<p>
Location:
<
%=
@job
.
city
.
name
unless
@job
.
city
.
nil?
%
>
</p>
<p>
Company:
<
Company
>
</p>
<p>
Company:
<
%=
@job
.
company
.
name
unless
@job
.
company
.
nil?
%
>
</p>
<p>
Your submitted information:
</p>
<p>
Your submitted information:
</p>
<p>
Full Name:
<%=
@fullname
%>
</p>
<p>
Full Name:
<%=
@fullname
%>
</p>
<p>
Email:
<%=
@email
%>
</p>
<p>
Email:
<%=
@email
%>
</p>
<p>
CV Link:
<%=
@cv_link
%>
</p>
<p>
CV Link:
<%=
@cv_link
%>
</p>
<p>
Best,
</p>
<p>
Best,
</p>
</body>
</body>
...
...
app/views/apply_mailer/apply_mail.text.erb
View file @
37e1a7ba
Hello
Dear
<%=
@fullname
%>
Thank you for applied with VenJOB. Your applied job's information is as follow:
Job title:
<%=
@job
.
name
%>
Location:
<%=
@job
.
city
.
name
unless
@job
.
city
.
nil?
%>
Company:
<%=
@job
.
company
.
name
unless
@job
.
company
.
nil?
%>
Your submitted information:
Full Name:
<%=
@fullname
%>
Email:
<%=
@email
%>
CV Link:
<%=
@cv_link
%>
Best,
app/views/jobs/apply.html.erb
View file @
37e1a7ba
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label>
Full name
</label><br
/>
<label>
Full name
</label><br
/>
<%=
text_field_tag
'fullname'
,
current_user
.
fullname
,
class:
'form-control'
%>
<%=
text_field_tag
'fullname'
,
current_user
.
fullname
,
class:
'form-control'
%>
<%=
hidden_field_tag
'job_id'
,
@job_id
%>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label>
Email
</label><br
/>
<label>
Email
</label><br
/>
...
...
app/views/jobs/confirm.html.erb
View file @
37e1a7ba
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label>
Full name
</label><br
/>
<label>
Full name
</label><br
/>
<%=
text_field_tag
'fullname'
,
@fullname
,
class:
'form-control'
,
readonly:
true
%>
<%=
text_field_tag
'fullname'
,
@fullname
,
class:
'form-control'
,
readonly:
true
%>
<%=
hidden_field_tag
'job_id'
,
@job_id
%>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label>
Email
</label><br
/>
<label>
Email
</label><br
/>
...
...
app/views/jobs/detail.html.erb
View file @
37e1a7ba
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
</div>
</div>
<div
class=
"col-md-2"
>
<div
class=
"col-md-2"
>
<%-
if
user_signed_in?
-%>
<%-
if
user_signed_in?
-%>
<%=
link_to
'Apply'
,
jobs_apply_path
,
class:
'btn btn-primary'
%>
<%=
link_to
'Apply'
,
jobs_apply_path
(
job_id:
@job
.
id
)
,
class:
'btn btn-primary'
%>
<%-
else
-%>
<%-
else
-%>
<%=
link_to
'Apply'
,
new_user_session_path
,
class:
'btn btn-primary'
%>
<%=
link_to
'Apply'
,
new_user_session_path
,
class:
'btn btn-primary'
%>
<%-
end
-%>
<%-
end
-%>
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-md-offset-3 "
>
<div
class=
"col-md-offset-3 "
>
<%-
if
user_signed_in?
-%>
<%-
if
user_signed_in?
-%>
<%=
link_to
'Apply'
,
jobs_apply_path
,
class:
'btn btn-primary'
%>
<%=
link_to
'Apply'
,
jobs_apply_path
(
job_id:
@job
.
id
)
,
class:
'btn btn-primary'
%>
<%-
else
-%>
<%-
else
-%>
<%=
link_to
'Apply'
,
new_user_session_path
,
class:
'btn btn-primary'
%>
<%=
link_to
'Apply'
,
new_user_session_path
,
class:
'btn btn-primary'
%>
<%-
end
-%>
<%-
end
-%>
...
...
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