Commit 6fa1254d by Mai Hoang Thai Ha

add job details

parent 0114316b
......@@ -83,14 +83,6 @@ footer {
// 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 {
font-size: 14px;
.job-title {
......@@ -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 {
h2 {
margin-bottom: 30px;
}
h2::after {
content: "";
display: block;
border-bottom: 1px solid rgba(0, 0, 0, 0.3);
}
.city-item {
margin-bottom: 12px;
a {
......@@ -173,14 +148,6 @@ footer {
// 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 {
margin-bottom: 12px;
a {
......
......@@ -16,7 +16,6 @@ class JobsController < ApplicationController
end
def show
@job = Job.find_by(params[:id])
# debugger
@job = Job.find(params[:id])
end
end
......@@ -5,14 +5,64 @@
= link_to 'Apply for this job', '#', class: 'btn btn-primary'
p.text-secondary
= @job.company.name
.row.bg-light
.col-4
ul.list-unstyled
- @job.cities.each do |city|
li
strong
| Location
- @job.cities.each do |city|
p
= city.name
li
strong
| Salary
p.text-success
= @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
= @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
.job-apply.d-flex.align-items-center.justify-content-between
= link_to 'Apply for this job', '#', class: 'btn btn-primary'
......
.latest-job.mb-5
.container
.container.mb-5
h2
| Latest jobs
hr.my-2
- @latest_jobs.each do |job|
.job-item.mb-4
= link_to job.title, "#", class: "job-title"
......@@ -16,5 +17,5 @@
li
= city.name
.job-desc
p
= job.description
\ No newline at end of file
= truncate(simple_format(job.description), escape: false, length: 250)
hr.my-2
.top_cities.mb-5
.container
h2 Top cities
hr.my-2
.row.align-items-start.mb-3
- @top_cities.each do |city, city_jobs|
.col-4.city-item
......
.top_industries.mb-5
.container
h2 Top industries
hr.my-2
.row.align-items-start
- @top_industries.each do |industry, industry_jobs|
.col-4.industry-item
......
......@@ -109,7 +109,7 @@ ActiveRecord::Schema.define(version: 2021_07_22_080023) do
end
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 "salary"
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