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 Hoang Mai Phuong
VeNJOB
Commits
72a3925d
Commit
72a3925d
authored
Jul 27, 2021
by
Nguyen Hoang Mai Phuong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix page-ID1
parent
0c9a14c9
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
17 additions
and
19 deletions
+17
-19
app/assets/stylesheets/custom.scss
+4
-4
app/controllers/top_controller.rb
+1
-0
app/models/city.rb
+2
-2
app/models/industry.rb
+2
-1
app/models/job.rb
+2
-1
app/views/layouts/_shim.html.slim
+0
-4
app/views/layouts/application.html.slim
+0
-1
app/views/top/home.html.slim
+6
-6
No files found.
app/assets/stylesheets/custom.scss
View file @
72a3925d
...
...
@@ -26,10 +26,10 @@
font-size
:
medium
;
}
a
{
color
:
rgb
(
14
,
14
,
14
);
text-decoration
:
none
;
&
:hover
{
color
:
orange
;
color
:
rgb
(
14
,
14
,
14
);
text-decoration
:
none
;
&
:hover
{
color
:
orange
;
}
}
...
...
app/controllers/top_controller.rb
View file @
72a3925d
...
...
@@ -3,5 +3,6 @@ class TopController < ApplicationController
@jobs
=
Job
.
latest_jobs
@cities
=
City
.
top_cities
@industries
=
Industry
.
top_industries
@total_job
=
Job
.
all
.
count
end
end
app/models/city.rb
View file @
72a3925d
...
...
@@ -4,5 +4,4 @@ class City < ApplicationRecord
has_and_belongs_to_many
:companies
LATEST_CITY_NUMBER
=
9
scope
:top_cities
,
->
{
joins
(
:jobs
).
group
(
:name
).
order
(
'count_all DESC'
).
count
.
take
(
LATEST_CITY_NUMBER
)
}
end
end
\ No newline at end of file
app/models/industry.rb
View file @
72a3925d
...
...
@@ -2,4 +2,4 @@ class Industry < ApplicationRecord
has_and_belongs_to_many
:jobs
LATEST_INDUSTRY_NUMBER
=
9
scope
:top_industries
,
->
{
joins
(
:jobs
).
group
(
:name
).
order
(
'count_all DESC'
).
count
.
take
(
LATEST_INDUSTRY_NUMBER
)
}
end
end
\ No newline at end of file
app/models/job.rb
View file @
72a3925d
...
...
@@ -7,4 +7,4 @@ class Job < ApplicationRecord
has_and_belongs_to_many
:cities
LATEST_JOB_NUMBER
=
5
scope
:latest_jobs
,
->
{
includes
(
:cities
,
:company
).
order
(
'created_at DESC'
).
limit
(
LATEST_JOB_NUMBER
)
}
end
end
\ No newline at end of file
app/views/layouts/_shim.html.slim
deleted
100644 → 0
View file @
0c9a14c9
<!
-
-
[
if
lt
IE
9
]
>
<
script
src
=
"//cdnjs.cloudflare.com/ajax/libs/html5shiv/r29/html5.min.js"
>
</script>
<![
endif
]--
>
app/views/layouts/application.html.slim
View file @
72a3925d
...
...
@@ -10,7 +10,6 @@ html
=
stylesheet_link_tag
'application'
,
media:
'all'
,
'data-turbolinks-track'
:
'reload'
=
javascript_pack_tag
'application'
,
'data-turbolinks-track'
:
'reload'
link
[
rel
=
"stylesheet"
href
=
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css"
]
=
render
'layouts/shim'
body
.bg-light
=
render
'layouts/header'
.container
...
...
app/views/top/home.html.slim
View file @
72a3925d
-
provide
:title
,
'Jobs'
h3
.p-2
|
Total
Jobs
:
=
Job
.
all
.
count
|
Total
:
=
pluralize
(
@total_job
,
'job'
)
.container
.input-group.py-3
input
.form-control.rounded
[
type
=
"search"
placeholder
=
"Search"
aria-label
=
"Search"
aria-describedby
=
"search-addon"
]
button
.btn.btn-outline-primary
[
type
=
"button"
]
|
search
|
Search
h4
.py-4
|
Latest Jobs
-
@jobs
.
each
do
|
job
|
...
...
@@ -19,12 +19,12 @@ h3.p-2
=
link_to
job
.
company
.
name
,
"#"
p
.mb-1
i
.fas.fa-dollar-sign.m-1
|
Lương:
|
Lương:
=
job
.
salary
p
.mb-1
i
.fas.fa-map-marker-alt.m-1
-
job
.
cities
.
each
do
|
job
|
=
job
.
name
-
job
.
cities
.
each
do
|
city
|
=
city
.
name
h4
|
Top Cities
.row.my-3.text-center.fs-5
...
...
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