fix ID4

parent 56de9774
Pipeline #1379 canceled with stages
in 0 seconds
...@@ -50,7 +50,8 @@ ...@@ -50,7 +50,8 @@
.favourite { .favourite {
float: right; float: right;
.btn { .btn {
height: 100%; margin-top: 50%;
margin-bottom: 50%;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
......
...@@ -2,10 +2,14 @@ class JobsController < ApplicationController ...@@ -2,10 +2,14 @@ class JobsController < ApplicationController
def show def show
if params[:city_slug].present? if params[:city_slug].present?
@city = City.find_by(slug: params[:city_slug]) @city = City.find_by(slug: params[:city_slug])
@jobs = @city.jobs.latest_jobs.page(params[:page]) @jobs = @city.jobs
@result = @city.name
else else
@industry = Industry.find_by(slug: params[:industry_slug]) @industry = Industry.find_by(slug: params[:industry_slug])
@jobs = @industry.jobs.latest_jobs.page(params[:page]) @jobs = @industry.jobs
@result = @industry.name
end end
@total = @jobs.count
@jobs = @jobs.latest_jobs.page(params[:page])
end end
end end
\ No newline at end of file
...@@ -3,9 +3,11 @@ ...@@ -3,9 +3,11 @@
= render 'search' = render 'search'
.container .container
h5.fw-normal h5.fw-normal
| Total: | Total:
= pluralize(@total, 'job')
h5.fw-normal h5.fw-normal
| Result for: | Result for:
= @result
h6.offset-md-4 h6.offset-md-4
= paginate @jobs, window: 1 = paginate @jobs, window: 1
.job-list .job-list
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment