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
3e6bc17b
Commit
3e6bc17b
authored
Jul 10, 2017
by
Thanh Hung Pham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add apply form
parent
518282b0
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
104 additions
and
1 deletions
+104
-1
app/controllers/jobs_controller.rb
+8
-0
app/views/jobs/apply.html.erb
+28
-0
app/views/jobs/confirm.html.erb
+29
-0
app/views/jobs/detail.html.erb
+34
-0
app/views/jobs/show.html.erb
+1
-1
config/routes.rb
+4
-0
No files found.
app/controllers/jobs_controller.rb
View file @
3e6bc17b
...
@@ -4,6 +4,14 @@ class JobsController < ApplicationController
...
@@ -4,6 +4,14 @@ class JobsController < ApplicationController
render
:applied_jobs
render
:applied_jobs
end
end
def
detail
@job
=
Job
.
find
(
params
[
:id
])
end
def
apply
end
def
show
def
show
unless
params
[
:city_id
].
nil?
unless
params
[
:city_id
].
nil?
@job_count
=
Job
.
where
(
city_id:
params
[
:city_id
]).
count
@job_count
=
Job
.
where
(
city_id:
params
[
:city_id
]).
count
...
...
app/views/jobs/apply.html.erb
0 → 100644
View file @
3e6bc17b
<%-
provide
(
:title
,
'Job Apply'
)
-%>
<div
class=
"well"
>
<div>
<strong>
<%=
link_to
'Apply New'
,
'#'
%>
</strong>
>
<%=
link_to
'Apply Confirmation'
,
'#'
%>
>
<%=
link_to
'Done'
,
'#'
%>
</div>
<h2>
Apply Form
</h2>
<div
class=
"form-group"
>
<label>
Full name
</label><br
/>
<input
type=
"text"
value=
"
<%=
current_user
.
fullname
%>
"
,
class=
"form-control"
/>
</div>
<div
class=
"form-group"
>
<label>
Email
</label><br
/>
<input
type=
"text"
value=
"
<%=
current_user
.
email
%>
"
,
class=
"form-control"
/>
</div>
<div
class=
"form-group"
>
<label>
Cv name
</label><br
/>
<%=
link_to
current_user
.
cv_name
,
registrations_download_file_path
%>
</div>
<div
class=
"form-group"
>
<a
class=
"btn btn-primary"
href=
"
<%=
jobs_confirm_path
%>
"
>
Confirm
</a>
</div>
</div>
app/views/jobs/confirm.html.erb
0 → 100644
View file @
3e6bc17b
<%-
provide
(
:title
,
'Confirmation'
)
-%>
<div
class=
"well"
>
<div>
<%=
link_to
'Apply New'
,
'#'
%>
>
<strong>
<%=
link_to
'Apply Confirmation'
,
'#'
%>
</strong>
>
<%=
link_to
'Done'
,
'#'
%>
</div>
<h2>
Apply Confirmation
</h2>
<div
class=
"form-group"
>
<label>
Full name
</label><br
/>
<input
type=
"text"
value=
"
<%=
current_user
.
fullname
%>
"
,
class=
"form-control"
,
readonly
/>
</div>
<div
class=
"form-group"
>
<label>
Email
</label><br
/>
<input
type=
"text"
value=
"
<%=
current_user
.
email
%>
"
,
class=
"form-control"
,
readonly
/>
</div>
<div
class=
"form-group"
>
<label>
Cv name
</label><br
/>
<%=
link_to
current_user
.
cv_name
,
registrations_download_file_path
%>
</div>
<div
class=
"form-group"
>
<a
class=
"btn btn-primary"
href=
"
<%=
jobs_apply_path
%>
"
>
Edit
</a>
<a
class=
"btn btn-primary"
href=
"
<%=
jobs_done_path
%>
"
>
Done
</a>
</div>
</div>
app/views/jobs/detail.html.erb
0 → 100644
View file @
3e6bc17b
<%-
provide
(
:title
,
'Job Detail'
)
-%>
<div
class=
"well"
>
<h2>
<%=
@job
.
name
%>
</h2>
<div
class=
"row"
>
<div
class=
"col-md-8"
>
<div
class=
"row"
>
<%=
@job
.
company
.
name
unless
@job
.
city
.
nil?
%>
</div>
<div
class=
"row"
>
<%=
@job
.
city
.
name
unless
@job
.
city
.
nil?
%>
</div>
<div
class=
"row"
>
<%=
@job
.
salary
%>
</div>
<div
class=
"row"
>
<%=
@job
.
description
%>
</div>
</div>
<div
class=
"col-md-4"
>
<%=
link_to
'Apply'
,
jobs_apply_path
,
class:
'btn btn-primary'
%>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-offset-3 "
>
<%=
link_to
'Apply'
,
jobs_apply_path
,
class:
'btn btn-primary'
%>
<%-
if
Favorite
.
where
(
user:
current_user
,
job:
@job
).
blank?
-%>
<%=
link_to
'Favorite'
,
'#'
,
class:
'favorite_add btn btn-primary'
%>
<input
type=
"hidden"
id=
"job_id"
name=
"job_id"
value=
"
<%=
@job
.
id
%>
"
>
<%-
else
-%>
<%=
link_to
'Favorite'
,
'#'
,
class:
'favorite_add btn btn-primary'
,
disabled:
true
%>
<%-
end
-%>
</div>
</div>
</div>
app/views/jobs/show.html.erb
View file @
3e6bc17b
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
<tbody>
<tbody>
<%-
@jobs
.
each
do
|
job
|
-%>
<%-
@jobs
.
each
do
|
job
|
-%>
<tr>
<tr>
<td>
<%=
job
.
name
%>
</td>
<td>
<%=
link_to
job
.
name
,
jobs_detail_path
(
id:
job
.
id
)
%>
</td>
<td>
<%=
truncate
(
job
.
description
,
length:
250
)
%>
</td>
<td>
<%=
truncate
(
job
.
description
,
length:
250
)
%>
</td>
<td>
<%=
job
.
city
.
name
unless
job
.
city
.
nil?
%>
</td>
<td>
<%=
job
.
city
.
name
unless
job
.
city
.
nil?
%>
</td>
<td>
<%=
job
.
salary
%>
</td>
<td>
<%=
job
.
salary
%>
</td>
...
...
config/routes.rb
View file @
3e6bc17b
...
@@ -7,6 +7,10 @@ Rails.application.routes.draw do
...
@@ -7,6 +7,10 @@ Rails.application.routes.draw do
get
'jobs/applied_jobs'
,
to:
'jobs#applied_jobs'
get
'jobs/applied_jobs'
,
to:
'jobs#applied_jobs'
get
'jobs/show/'
,
to:
'jobs#show'
get
'jobs/show/'
,
to:
'jobs#show'
get
'jobs/detail/'
,
to:
'jobs#detail'
get
'jobs/apply/'
,
to:
'jobs#apply'
get
'jobs/confirm'
,
to:
'jobs#confirm'
get
'jobs/done'
,
to:
'jobs#done'
get
'jobs/favorite'
,
to:
'jobs#favorite'
get
'jobs/favorite'
,
to:
'jobs#favorite'
get
'jobs/favorite_remove'
,
to:
'jobs#favorite_remove'
get
'jobs/favorite_remove'
,
to:
'jobs#favorite_remove'
get
'jobs/favorited_jobs'
,
to:
'jobs#favorited_jobs'
get
'jobs/favorited_jobs'
,
to:
'jobs#favorited_jobs'
...
...
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