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
2e642584
Commit
2e642584
authored
Jul 11, 2017
by
Thanh Hung Pham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Send info to another form
parent
2f8b6e0a
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
13 deletions
+28
-13
app/controllers/jobs_controller.rb
+9
-0
app/views/jobs/apply.html.erb
+8
-6
app/views/jobs/confirm.html.erb
+8
-6
app/views/jobs/history_jobs.html.erb
+1
-1
config/routes.rb
+2
-0
No files found.
app/controllers/jobs_controller.rb
View file @
2e642584
...
@@ -13,6 +13,15 @@ class JobsController < ApplicationController
...
@@ -13,6 +13,15 @@ class JobsController < ApplicationController
end
end
def
confirm
@fullname
=
params
[
'fullname'
]
@email
=
params
[
'email'
]
end
def
done
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
View file @
2e642584
<%-
provide
(
:title
,
'Job Apply'
)
-%>
<%-
provide
(
:title
,
'Job Apply'
)
-%>
<div
class=
"well"
>
<div
class=
"well"
>
<div>
<div>
<strong>
<%=
link_to
'Apply New'
,
'#'
%>
</strong>
<strong>
<%=
link_to
'Apply New'
,
jobs_apply_path
%>
</strong>
>
>
<%=
link_to
'Apply Confirmation'
,
'#'
%>
<%=
link_to
'Apply Confirmation'
,
jobs_confirm_path
%>
>
>
<%=
link_to
'Done'
,
'#'
%>
<%=
link_to
'Done'
,
jobs_done_path
%>
</div>
</div>
<h2>
Apply Form
</h2>
<h2>
Apply Form
</h2>
<%=
form_tag
jobs_confirm_path
do
%>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label>
Full name
</label><br
/>
<label>
Full name
</label><br
/>
<input
type=
"text"
value=
"
<%=
current_user
.
fullname
%>
"
,
class=
"form-control"
/
>
<%=
text_field_tag
'fullname'
,
current_user
.
fullname
,
class:
'form-control'
%
>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label>
Email
</label><br
/>
<label>
Email
</label><br
/>
<input
type=
"text"
value=
"
<%=
current_user
.
email
%>
"
,
class=
"form-control"
/
>
<%=
text_field_tag
'email'
,
current_user
.
email
,
class:
'form-control'
%
>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label>
Cv name
</label><br
/>
<label>
Cv name
</label><br
/>
...
@@ -23,6 +24,7 @@
...
@@ -23,6 +24,7 @@
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<a
class=
"btn btn-primary"
href=
"
<%=
jobs_confirm_path
%>
"
>
Confirm
</a
>
<%=
submit_tag
'Confirm'
,
class:
'btn btn-primary'
%
>
</div>
</div>
<%-
end
-%>
</div>
</div>
app/views/jobs/confirm.html.erb
View file @
2e642584
<%-
provide
(
:title
,
'Confirmation'
)
-%>
<%-
provide
(
:title
,
'Confirmation'
)
-%>
<div
class=
"well"
>
<div
class=
"well"
>
<div>
<div>
<%=
link_to
'Apply New'
,
'#'
%>
<%=
link_to
'Apply New'
,
jobs_apply_path
%>
>
>
<strong>
<%=
link_to
'Apply Confirmation'
,
'#'
%>
</strong>
<strong>
<%=
link_to
'Apply Confirmation'
,
jobs_confirm_path
%>
</strong>
>
>
<%=
link_to
'Done'
,
'#'
%>
<%=
link_to
'Done'
,
jobs_done_path
%>
</div>
</div>
<h2>
Apply Confirmation
</h2>
<h2>
Apply Confirmation
</h2>
<%=
form_tag
jobs_done_path
do
%>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label>
Full name
</label><br
/>
<label>
Full name
</label><br
/>
<input
type=
"text"
value=
"
<%=
current_user
.
fullname
%>
"
,
class=
"form-control"
,
readonly
/
>
<%=
text_field_tag
'fullname'
,
@fullname
,
class:
'form-control'
,
readonly:
true
%
>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label>
Email
</label><br
/>
<label>
Email
</label><br
/>
<input
type=
"text"
value=
"
<%=
current_user
.
email
%>
"
,
class=
"form-control"
,
readonly
/
>
<%=
text_field_tag
'email'
,
@email
,
class:
'form-control'
,
readonly:
true
%
>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label>
Cv name
</label><br
/>
<label>
Cv name
</label><br
/>
...
@@ -24,6 +25,7 @@
...
@@ -24,6 +25,7 @@
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<a
class=
"btn btn-primary"
href=
"
<%=
jobs_apply_path
%>
"
>
Edit
</a>
<a
class=
"btn btn-primary"
href=
"
<%=
jobs_apply_path
%>
"
>
Edit
</a>
<a
class=
"btn btn-primary"
href=
"
<%=
jobs_done_path
%>
"
>
Done
</a
>
<%=
submit_tag
'Done'
,
class:
'btn btn-primary'
%
>
</div>
</div>
<%-
end
-%>
</div>
</div>
app/views/jobs/history_jobs.html.erb
View file @
2e642584
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<tbody>
<tbody>
<%-
@history_jobs
.
each
do
|
history
|
-%>
<%-
@history_jobs
.
each
do
|
history
|
-%>
<tr>
<tr>
<td>
<%=
history
.
job
.
name
%>
</td>
<td>
<%=
link_to
history
.
job
.
name
,
jobs_detail_path
(
id:
history
.
job
.
id
)
%>
</td>
<td>
<%=
truncate
(
history
.
job
.
description
,
length:
250
)
%>
</td>
<td>
<%=
truncate
(
history
.
job
.
description
,
length:
250
)
%>
</td>
<td>
<%=
history
.
job
.
city
.
name
unless
history
.
job
.
city
.
nil?
%>
</td>
<td>
<%=
history
.
job
.
city
.
name
unless
history
.
job
.
city
.
nil?
%>
</td>
<td>
<%=
history
.
job
.
salary
%>
</td>
<td>
<%=
history
.
job
.
salary
%>
</td>
...
...
config/routes.rb
View file @
2e642584
...
@@ -10,7 +10,9 @@ Rails.application.routes.draw do
...
@@ -10,7 +10,9 @@ Rails.application.routes.draw do
get
'jobs/detail/'
,
to:
'jobs#detail'
get
'jobs/detail/'
,
to:
'jobs#detail'
get
'jobs/apply/'
,
to:
'jobs#apply'
get
'jobs/apply/'
,
to:
'jobs#apply'
get
'jobs/confirm'
,
to:
'jobs#confirm'
get
'jobs/confirm'
,
to:
'jobs#confirm'
post
'jobs/confirm'
,
to:
'jobs#confirm'
get
'jobs/done'
,
to:
'jobs#done'
get
'jobs/done'
,
to:
'jobs#done'
post
'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