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
1
Merge Requests
1
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 Sỹ Hoàng
VenJob
Commits
0a22afec
Commit
0a22afec
authored
Jan 15, 2020
by
Đường Sỹ Hoàng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add params to url
parent
a0a457d1
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
25 deletions
+21
-25
app/controllers/apply_controller.rb
+0
-1
app/views/apply/confirm.html.erb
+14
-8
app/views/apply/new.html.erb
+4
-10
app/views/jobs/show.html.erb
+0
-4
app/views/top/_job.html.erb
+1
-1
db/migrate/20200115032331_change_type_user_job.rb
+1
-0
db/schema.rb
+1
-1
No files found.
app/controllers/apply_controller.rb
View file @
0a22afec
...
@@ -10,7 +10,6 @@ class ApplyController < ApplicationController
...
@@ -10,7 +10,6 @@ class ApplyController < ApplicationController
end
end
end
end
def
confirm
def
confirm
@apply
=
current_user
.
applies
.
new
(
apply_job_params
)
@apply
=
current_user
.
applies
.
new
(
apply_job_params
)
end
end
...
...
app/views/apply/confirm.html.erb
View file @
0a22afec
...
@@ -11,8 +11,12 @@
...
@@ -11,8 +11,12 @@
<%=
link_to
"Apply Finish"
,
"#"
%>
<%=
link_to
"Apply Finish"
,
"#"
%>
</li>
</li>
</ol>
</ol>
</nav>
<%=
form_for
(
@apply
,
url:
done_path
(
@job
))
do
|
f
|
%>
<div
class=
"container"
>
<div
class=
"d-flex justify-content-center "
>
<div
class=
"card"
>
</nav>
<%=
form_for
(
@apply
,
url:
done_path
(
@job
))
do
|
f
|
%>
<div
class=
"field"
>
<div
class=
"field"
>
<%=
f
.
label
:username
%>
<%=
f
.
label
:username
%>
</br>
</br>
...
@@ -49,16 +53,18 @@
...
@@ -49,16 +53,18 @@
</div>
</div>
</br>
</br>
<div
class=
"field"
>
<div
class =
"actions"
>
<div
class =
"actions"
>
<%=
f
.
submit
"Done"
,
class:
"btn btn-primary"
%>
<%=
f
.
submit
"Done"
,
class:
"btn btn-primary"
%>
</div>
</div>
<%
end
%>
<div
class=
"action float-right"
>
<div
class =
"float-right"
>
<%=
link_to
"Edit"
,
apply_path
(
@job
,
apply:
{
first_name:
@apply
.
first_name
,
<%=
link_to
"Done"
,
done_path
(
@job
),
class:
"btn btn-primary"
%>
last_name:
@apply
.
last_name
,
email:
@apply
.
email
,
cv_url:
@apply
.
cv_url
}),
class:
"btn btn-primary"
%>
</div>
</div>
</div>
<div
class=
"float-left"
>
<%
end
%>
<%=
link_to
"Edit"
,
apply_path
,
class:
"btn btn-primary"
%>
</div>
</div>
</div>
</div>
</div>
</div>
app/views/apply/new.html.erb
View file @
0a22afec
...
@@ -20,34 +20,28 @@
...
@@ -20,34 +20,28 @@
<h2>
Apply Form
</h2>
<h2>
Apply Form
</h2>
</div>
</div>
<%=
form_for
(
@apply
,
url:
confirm_path
(
@job
))
do
|
f
|
%>
<%=
form_for
(
@apply
,
url:
confirm_path
(
@job
))
do
|
f
|
%>
<div
class=
"field"
>
<%=
f
.
label
:username
%>
</br>
<%=
f
.
text_field
:username
,
autofocus:
true
,
length:
200
%>
</div>
<div
class=
"field"
>
<div
class=
"field"
>
<%=
f
.
label
:first_name
%>
<%=
f
.
label
:first_name
%>
</br>
</br>
<%=
f
.
text_field
:first_name
,
autofocus:
true
%>
<%=
f
.
text_field
:first_name
%>
</div>
</div>
<div
class=
"field"
>
<div
class=
"field"
>
<%=
f
.
label
:last_name
%>
<%=
f
.
label
:last_name
%>
</br>
</br>
<%=
f
.
text_field
:last_name
,
autofocus:
true
%>
<%=
f
.
text_field
:last_name
%>
</div>
</div>
<div
class=
"field"
>
<div
class=
"field"
>
<%=
f
.
label
:email
%>
<%=
f
.
label
:email
%>
</br>
</br>
<%=
f
.
email_field
:email
,
autofocus:
true
%>
<%=
f
.
email_field
:email
%>
</div>
</div>
<div
class=
"field"
>
<div
class=
"field"
>
<%=
f
.
label
:CV_URL
%>
<%=
f
.
label
:CV_URL
%>
</br>
</br>
<%=
f
.
url_field
:cv_url
,
autofocus:
true
%>
<%=
f
.
url_field
:cv_url
%>
</div>
</div>
</br>
</br>
<div
class =
"actions"
>
<div
class =
"actions"
>
...
...
app/views/jobs/show.html.erb
View file @
0a22afec
...
@@ -49,10 +49,6 @@
...
@@ -49,10 +49,6 @@
<dt
class=
"col-sm-3"
>
Requirement:
</dt>
<dt
class=
"col-sm-3"
>
Requirement:
</dt>
<dd
class=
"col-sm-9"
>
<%=
simple_format
@job
.
requirement
%>
</dd>
<dd
class=
"col-sm-9"
>
<%=
simple_format
@job
.
requirement
%>
</dd>
</dl>
</dl>
<%
if
user_signed_in?
%>
<%=
link_to
"Apply"
,
apply_path
,
class:
"btn btn-primary"
%>
<%=
link_to
"Apply"
,
apply_path
,
class:
"btn btn-primary"
%>
<%
else
%>
<%=
link_to
"Login"
,
login_path
,
class:
"btn btn-primary"
%>
<%
end
%>
</div>
</div>
</div
</div
app/views/top/_job.html.erb
View file @
0a22afec
<div
class=
"row align-items-center"
>
<div
class=
"row align-items-center"
>
<div
class=
"col text-center"
>
<div
class=
"col text-center"
>
<%=
job
.
title
%>
<%=
link_to
"
#{
job
.
title
}
"
,
job_path
(
job
.
id
)
%>
</div>
</div>
</div>
</div>
</br>
</br>
db/migrate/20200115032331_change_type_user_job.rb
View file @
0a22afec
class
ChangeTypeUserJob
<
ActiveRecord
::
Migration
[
6.0
]
class
ChangeTypeUserJob
<
ActiveRecord
::
Migration
[
6.0
]
def
change
def
change
rename_column
:user_jobs
,
:job_type
,
:type
rename_column
:user_jobs
,
:job_type
,
:type
change_column
:user_jobs
,
:type
,
:string
end
end
end
end
db/schema.rb
View file @
0a22afec
...
@@ -71,7 +71,7 @@ ActiveRecord::Schema.define(version: 2020_01_15_032331) do
...
@@ -71,7 +71,7 @@ ActiveRecord::Schema.define(version: 2020_01_15_032331) do
create_table
"user_jobs"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8"
,
force: :cascade
do
|
t
|
create_table
"user_jobs"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8"
,
force: :cascade
do
|
t
|
t
.
integer
"user_id"
t
.
integer
"user_id"
t
.
integer
"job_id"
t
.
integer
"job_id"
t
.
integer
"type"
t
.
string
"type"
t
.
datetime
"favorited_at"
t
.
datetime
"favorited_at"
t
.
datetime
"viewed_at"
t
.
datetime
"viewed_at"
t
.
datetime
"applied_at"
t
.
datetime
"applied_at"
...
...
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