Commit 6fa1254d by Mai Hoang Thai Ha

add job details

parent 0114316b
...@@ -83,14 +83,6 @@ footer { ...@@ -83,14 +83,6 @@ footer {
// latest-job // latest-job
.latest-job { .latest-job {
h2 {
margin-bottom: 30px;
}
h2::after {
content: "";
display: block;
border-bottom: 1px solid rgba(0, 0, 0, 0.3);
}
.job-item { .job-item {
font-size: 14px; font-size: 14px;
.job-title { .job-title {
...@@ -129,28 +121,11 @@ footer { ...@@ -129,28 +121,11 @@ footer {
} }
} }
} }
.job-item::after {
content: "";
display: block;
margin-top: 10px;
border-bottom: 1px solid rgba(0, 0, 0, 0.3);
}
.job-item:last-child::after{
border-bottom: none;
}
} }
// top_cities // top_cities
.top_cities { .top_cities {
h2 {
margin-bottom: 30px;
}
h2::after {
content: "";
display: block;
border-bottom: 1px solid rgba(0, 0, 0, 0.3);
}
.city-item { .city-item {
margin-bottom: 12px; margin-bottom: 12px;
a { a {
...@@ -173,14 +148,6 @@ footer { ...@@ -173,14 +148,6 @@ footer {
// top_industries // top_industries
.top_industries { .top_industries {
h2 {
margin-bottom: 30px;
}
h2::after {
content: "";
display: block;
border-bottom: 1px solid rgba(0, 0, 0, 0.3);
}
.industry-item { .industry-item {
margin-bottom: 12px; margin-bottom: 12px;
a { a {
......
...@@ -16,7 +16,6 @@ class JobsController < ApplicationController ...@@ -16,7 +16,6 @@ class JobsController < ApplicationController
end end
def show def show
@job = Job.find_by(params[:id]) @job = Job.find(params[:id])
# debugger
end end
end end
...@@ -5,14 +5,64 @@ ...@@ -5,14 +5,64 @@
= link_to 'Apply for this job', '#', class: 'btn btn-primary' = link_to 'Apply for this job', '#', class: 'btn btn-primary'
p.text-secondary p.text-secondary
= @job.company.name = @job.company.name
.row.bg-light
.col-4
ul.list-unstyled ul.list-unstyled
- @job.cities.each do |city|
li li
strong
| Location
- @job.cities.each do |city|
p
= city.name = city.name
li
strong
| Salary
p.text-success p.text-success
= @job.salary = @job.salary
.col-4
ul.list-unstyled
li
strong
| Type
p
= @job.job_type
li
strong
| Position
p
= @job.position
.col-4
ul.list-unstyled
li
strong
| Experience
p
= @job.experience
li
strong
| Expiration date
p p
= @job.description = @job.expiration_date
.job-benefits.my-4
h3
| Benefits
.row
- @job.benefit.split('---').each do |benefit|
li.list-unstyled.col-4.text-secondary
= benefit
.job-desc.my-4
h3
| Description
= @job.description.html_safe()
.job-req.my-4
h3
| Requirement
= @job.requirement.html_safe()
.job-info.my-4
h3
| Other info
- @job.other_info.split('---').each do |info|
li.text-secondary
= info = info
.job-apply.d-flex.align-items-center.justify-content-between .job-apply.d-flex.align-items-center.justify-content-between
= link_to 'Apply for this job', '#', class: 'btn btn-primary' = link_to 'Apply for this job', '#', class: 'btn btn-primary'
......
.latest-job.mb-5 .latest-job.mb-5
.container .container.mb-5
h2 h2
| Latest jobs | Latest jobs
hr.my-2
- @latest_jobs.each do |job| - @latest_jobs.each do |job|
.job-item.mb-4 .job-item.mb-4
= link_to job.title, "#", class: "job-title" = link_to job.title, "#", class: "job-title"
...@@ -16,5 +17,5 @@ ...@@ -16,5 +17,5 @@
li li
= city.name = city.name
.job-desc .job-desc
p = truncate(simple_format(job.description), escape: false, length: 250)
= job.description hr.my-2
\ No newline at end of file
.top_cities.mb-5 .top_cities.mb-5
.container .container
h2 Top cities h2 Top cities
hr.my-2
.row.align-items-start.mb-3 .row.align-items-start.mb-3
- @top_cities.each do |city, city_jobs| - @top_cities.each do |city, city_jobs|
.col-4.city-item .col-4.city-item
......
.top_industries.mb-5 .top_industries.mb-5
.container .container
h2 Top industries h2 Top industries
hr.my-2
.row.align-items-start .row.align-items-start
- @top_industries.each do |industry, industry_jobs| - @top_industries.each do |industry, industry_jobs|
.col-4.industry-item .col-4.industry-item
......
...@@ -109,7 +109,7 @@ ActiveRecord::Schema.define(version: 2021_07_22_080023) do ...@@ -109,7 +109,7 @@ ActiveRecord::Schema.define(version: 2021_07_22_080023) do
end end
create_table "jobs", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| create_table "jobs", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "title" t.string "title", null: false
t.string "job_type" t.string "job_type"
t.string "salary" t.string "salary"
t.string "experience" t.string "experience"
......
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