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
a810b7ef
Commit
a810b7ef
authored
Jan 17, 2020
by
Đường Sỹ Hoàng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change block if else
parent
0da11390
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
6 deletions
+9
-6
app/views/apply/_apply.html.erb
+1
-1
app/views/apply/index.html.erb
+1
-1
app/views/jobs/show.html.erb
+5
-1
app/views/layouts/_header.html.erb
+1
-1
config/routes.rb
+1
-2
No files found.
app/views/apply/_appl
ied
.html.erb
→
app/views/apply/_appl
y
.html.erb
View file @
a810b7ef
<%
job
=
appl
ied
.
job
%>
<%
job
=
appl
y
.
job
%>
<dl
class=
"row-cols"
>
<dl
class=
"row-cols"
>
<dt
class=
"col-sm-6"
>
Job Title:
</dt>
<dt
class=
"col-sm-6"
>
Job Title:
</dt>
<dd
class=
"col-sm-12"
<%
link_to
job_detail_path
(
job
.
id
)
%>
>
<dd
class=
"col-sm-12"
<%
link_to
job_detail_path
(
job
.
id
)
%>
>
...
...
app/views/apply/index.html.erb
View file @
a810b7ef
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<div>
<div>
<%=
paginate
@applies
%>
<%=
paginate
@applies
%>
<div
class=
"row row-cols-3"
>
<div
class=
"row row-cols-3"
>
<%=
render
partial:
"apply/appl
ied
"
,
collection:
@applies
%>
<%=
render
partial:
"apply/appl
y
"
,
collection:
@applies
%>
</div>
</div>
</div>
</div>
<%=
paginate
@applies
%>
<%=
paginate
@applies
%>
app/views/jobs/show.html.erb
View file @
a810b7ef
...
@@ -49,7 +49,11 @@
...
@@ -49,7 +49,11 @@
<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>
<%=
link_to_if
(
current_user
.
applies
.
find_by
(
job_id:
@job
.
id
).
nil?
,
"Apply"
,
apply_path
,
class:
"btn btn-primary"
)
{
link_to
"Apply"
,
apply_path
,
class:
"btn btn-primary disabled"
}
%>
<%
if
current_user
.
applies
.
nil?
%>
<%=
link_to
"Apply"
,
apply_path
,
class:
"btn btn-primary"
%>
<%
else
%>
<%=
link_to
"Apply"
,
"#"
,
class:
"btn btn-primary disabled"
%>
<%
end
%>
<%=
render
"favorites/favorite_form"
,
job:
@job
%>
<%=
render
"favorites/favorite_form"
,
job:
@job
%>
</div>
</div>
</div
</div
app/views/layouts/_header.html.erb
View file @
a810b7ef
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<%
if
user_signed_in?
%>
<%
if
user_signed_in?
%>
<%=
link_to
"Log out"
,
destroy_user_session_path
,
method: :delete
,
class:
"btn btn-outline-success"
%>
<%=
link_to
"Log out"
,
destroy_user_session_path
,
method: :delete
,
class:
"btn btn-outline-success"
%>
<%=
link_to
"Favorite"
,
favorites_path
,
method: :get
,
class:
"btn btn-outline-success"
%>
<%=
link_to
"Favorite"
,
favorites_path
,
method: :get
,
class:
"btn btn-outline-success"
%>
<%=
link_to
"Applied jobs"
,
appl
ied
_path
,
method: :get
,
class:
"btn btn-outline-success"
%>
<%=
link_to
"Applied jobs"
,
appl
y_index
_path
,
method: :get
,
class:
"btn btn-outline-success"
%>
<button
class=
"btn btn-outline-success"
type=
"button"
>
History
</button>
<button
class=
"btn btn-outline-success"
type=
"button"
>
History
</button>
<%
else
%>
<%
else
%>
<form
class=
"form-inline"
>
<form
class=
"form-inline"
>
...
...
config/routes.rb
View file @
a810b7ef
...
@@ -11,7 +11,7 @@ Rails.application.routes.draw do
...
@@ -11,7 +11,7 @@ Rails.application.routes.draw do
resources
:top
,
only: :index
resources
:top
,
only: :index
resources
:users
,
only: :show
resources
:users
,
only: :show
resources
:favorites
,
only: :index
resources
:favorites
,
only: :index
resources
:apply
,
only: :index
resources
:jobs
,
only: :show
,
concerns: :paginatable
do
resources
:jobs
,
only: :show
,
concerns: :paginatable
do
resources
:favorites
,
only:
[
:create
,
:destroy
]
resources
:favorites
,
only:
[
:create
,
:destroy
]
end
end
...
@@ -35,5 +35,4 @@ Rails.application.routes.draw do
...
@@ -35,5 +35,4 @@ Rails.application.routes.draw do
get
"apply/:job_id"
,
to:
"apply#new"
,
as:
"apply"
get
"apply/:job_id"
,
to:
"apply#new"
,
as:
"apply"
post
"confirm/:job_id"
,
to:
"apply#confirm"
,
as:
"confirm"
post
"confirm/:job_id"
,
to:
"apply#confirm"
,
as:
"confirm"
post
"done/:job_id"
,
to:
"apply#done"
,
as:
"done"
post
"done/:job_id"
,
to:
"apply#done"
,
as:
"done"
get
"applied"
,
to:
"apply#index"
,
as:
"applied"
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