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
0
Merge Requests
0
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
Nguyen Ngoc Nghia
VeNJOB
Commits
61eedf79
Commit
61eedf79
authored
Dec 20, 2019
by
nnnghia98
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
link city/industry to jobs
parent
dd62ee75
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
23 additions
and
17 deletions
+23
-17
app/assets/stylesheets/custom.scss
+6
-2
app/controllers/jobs_controller.rb
+4
-4
app/views/cities/_city.html.erb
+1
-1
app/views/cities/index.html.erb
+1
-1
app/views/industries/_industry.html.erb
+1
-1
app/views/industries/index.html.erb
+2
-0
app/views/jobs/_job.html.erb
+1
-1
app/views/jobs/index.html.erb
+1
-1
app/views/shared/_latest_job.html.erb
+1
-1
app/views/tops/index.html.erb
+5
-5
No files found.
app/assets/stylesheets/custom.scss
View file @
61eedf79
...
...
@@ -26,7 +26,6 @@ textarea {
}
.center
{
text-align
:
center
;
h1
{
margin-bottom
:
10px
;
}
...
...
@@ -52,6 +51,10 @@ p {
line-height
:
1
.7em
;
}
.container.text-center
{
margin-bottom
:
30px
;
}
/* header */
/* footer */
...
...
@@ -120,7 +123,8 @@ html {
/* job */
.box
{
border
:
solid
1px
black
;
border
:
solid
1px
rgb
(
26
,
101
,
131
);
border-radius
:
10px
;
margin
:
10px
;
padding
:
5px
;
.job_data
{
...
...
app/controllers/jobs_controller.rb
View file @
61eedf79
...
...
@@ -2,12 +2,12 @@ class JobsController < ApplicationController
def
index
if
params
[
:city_id
]
redirect_to
jobs_path
if
params
[
:city_id
].
blank?
@city
_name
=
City
.
find
(
params
[
:city_id
])
@jobs
=
@city
_name
.
jobs
@city
=
City
.
find
(
params
[
:city_id
])
@jobs
=
@city
.
jobs
elsif
params
[
:industry_id
]
redirect_to
jobs_path
if
params
[
:industry_id
].
blank?
@industry
_name
=
Industry
.
find
(
params
[
:industry_id
])
@jobs
=
@industry
_name
.
jobs
@industry
=
Industry
.
find
(
params
[
:industry_id
])
@jobs
=
@industry
.
jobs
else
@jobs
=
Job
.
all
end
...
...
app/views/cities/_city.html.erb
View file @
61eedf79
<div
class=
"col-md-3"
>
<div
class=
"col-show"
>
<%=
link_to
"
#{
city
.
name
}
(
#{
city
.
job_count
}
)"
,
jobs_path
%>
<%=
link_to
"
#{
city
.
name
}
(
#{
city
.
job_count
}
)"
,
city_jobs_path
(
city
.
id
)
%>
</div>
</div>
app/views/cities/index.html.erb
View file @
61eedf79
<div
class=
"container
jumbotron
text-center"
>
<div
class=
"container text-center"
>
<h1>
City List
</h1>
<div
class=
"row"
>
<div
class=
"col-sm"
>
...
...
app/views/industries/_industry.html.erb
View file @
61eedf79
<div
class=
"col-md-3"
>
<div
class=
"col-show"
>
<%=
link_to
"
#{
industry
.
name
}
(
#{
industry
.
job_count
}
)"
,
jobs_path
%>
<%=
link_to
"
#{
industry
.
name
}
(
#{
industry
.
job_count
}
)"
,
industry_jobs_path
(
industry
.
id
)
%>
</div>
</div>
app/views/industries/index.html.erb
View file @
61eedf79
<h1
class=
"text-center"
>
Industry List
</h1>
<div
class=
"row row-cols-5"
>
<%=
render
partial:
"industries/industry"
,
collection:
@industries
%>
</div>
app/views/jobs/_job.html.erb
View file @
61eedf79
...
...
@@ -2,7 +2,7 @@
<div
class=
"job_data"
>
<dl
class=
"job_data_row"
>
<dt>
Title
</dt>
<dd>
<%=
link_to
job
.
title
,
job
s_path
%>
</dd>
<dd>
<%=
link_to
job
.
title
,
job
_path
(
job
.
id
)
%>
</dd>
</dl>
<dl
class=
"job_data_row"
>
<dt>
Short description
</dt>
...
...
app/views/jobs/index.html.erb
View file @
61eedf79
<h3>
Total:
<%=
@jobs
.
count
%>
</h3>
<h3>
Total:
<%=
Job
.
count
%>
</h3>
<h3>
Result for:
</h3>
<%=
paginate
@jobs
%>
...
...
app/views/shared/_latest_job.html.erb
View file @
61eedf79
...
...
@@ -2,7 +2,7 @@
<div
class=
"job_data"
>
<dl
class=
"job_data_row"
>
<dt>
Title
</dt>
<dd>
<%=
l
atest_job
.
title
%>
</dd>
<dd>
<%=
l
ink_to
latest_job
.
title
,
job_path
(
latest_job
.
id
)
%>
</dd>
</dl>
<dl
class=
"job_data_row"
>
<dt>
Short description
</dt>
...
...
app/views/tops/index.html.erb
View file @
61eedf79
<%
provide
(
:title
,
"Top Page"
)
%>
<div
class=
"
center
jumbotron"
>
<div
class=
"banner"
>
<div
class=
"jumbotron"
>
<div
class=
"banner
text-center
"
>
<%=
image_tag
(
"skyline_darker.jpg"
)
%>
</div>
...
...
@@ -10,18 +10,18 @@
<div
class=
"search"
></div>
<div
class=
"lastest_jobs"
>
<h3>
Latest jobs
</h3>
<h3
class=
"text-center"
>
Latest jobs
</h3>
<div>
<%=
render
partial:
"shared/latest_job"
,
collection:
@jobs
%>
</div>
</div>
<div
class=
"top_cities"
>
<div
class=
"top_cities
text-center
"
>
<%=
render
"shared/top_cities"
%>
</div>
<div
class=
"top_industries"
>
<div
class=
"top_industries
text-center
"
>
<%=
render
"shared/top_industries"
%>
</div>
</div>
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