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
abd34948
Commit
abd34948
authored
Jul 11, 2017
by
Thanh Hung Pham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update mail content
parent
b85a16cb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
6 deletions
+31
-6
app/controllers/jobs_controller.rb
+4
-1
app/mailers/apply_mailer.rb
+5
-2
app/views/apply_mailer/apply_mail.html.erb
+12
-1
app/views/jobs/detail.html.erb
+10
-2
No files found.
app/controllers/jobs_controller.rb
View file @
abd34948
...
...
@@ -19,7 +19,10 @@ class JobsController < ApplicationController
end
def
done
ApplyMailer
.
apply_mail
(
current_user
).
deliver
@email
=
params
[
:email
]
@fullname
=
params
[
:fullname
]
@cv_link
=
'link to download'
ApplyMailer
.
apply_mail
(
@email
,
@fullname
,
@cv_link
).
deliver
end
def
show
...
...
app/mailers/apply_mailer.rb
View file @
abd34948
class
ApplyMailer
<
ApplicationMailer
default
from:
'hungpt@zigexn.vn'
def
apply_mail
(
current_user
)
mail
(
to:
current_user
.
email
,
subject:
'Thank you for apply with VeNJOB'
)
def
apply_mail
(
email
,
fullname
,
cv_link
)
@email
=
email
@fullname
=
fullname
@cv_link
=
cv_link
mail
(
to:
email
,
subject:
'Thank you for apply with VeNJOB'
)
end
end
app/views/apply_mailer/apply_mail.html.erb
View file @
abd34948
...
...
@@ -4,6 +4,17 @@
<meta
content=
'text/html; charset=UTF-8'
http-equiv=
'Content-Type'
/>
</head>
<body>
<h2>
Hello
</h2>
<p>
Dear
<%=
@fullname
%>
</p>
<p>
Thank you for applied with VenJOB. Your applied job's information is as follow:
</p>
<p>
Job title:
<Job
title
>
</p>
<p>
Location:
<Job
location
>
</p>
<p>
Company:
<Company>
</p>
<p>
Your submitted information:
</p>
<p>
Full Name:
<%=
@fullname
%>
</p>
<p>
Email:
<%=
@email
%>
</p>
<p>
CV Link:
<%=
@cv_link
%>
</p>
<p>
Best,
</p>
</body>
</html>
app/views/jobs/detail.html.erb
View file @
abd34948
...
...
@@ -17,12 +17,20 @@
</div>
</div>
<div
class=
"col-md-2"
>
<%=
link_to
'Apply'
,
jobs_apply_path
,
class:
'btn btn-primary'
%>
<%-
if
user_signed_in?
-%>
<%=
link_to
'Apply'
,
jobs_apply_path
,
class:
'btn btn-primary'
%>
<%-
else
-%>
<%=
link_to
'Apply'
,
new_user_session_path
,
class:
'btn btn-primary'
%>
<%-
end
-%>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-offset-3 "
>
<%=
link_to
'Apply'
,
jobs_apply_path
,
class:
'btn btn-primary'
%>
<%-
if
user_signed_in?
-%>
<%=
link_to
'Apply'
,
jobs_apply_path
,
class:
'btn btn-primary'
%>
<%-
else
-%>
<%=
link_to
'Apply'
,
new_user_session_path
,
class:
'btn btn-primary'
%>
<%-
end
-%>
<%-
if
Favorite
.
where
(
user:
current_user
,
job:
@job
).
blank?
-%>
<%-
if
user_signed_in?
-%>
<%=
link_to
'Favorite'
,
'#'
,
class:
'favorite_add btn btn-primary'
%>
...
...
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