Commit cbf02c31 by Tô Ngọc Ánh

create job detail

parent d1bf2e45
Pipeline #823 failed with stages
in 0 seconds
......@@ -26,7 +26,7 @@
background-color: $main-color;
}
hr {
.divider {
width: 100px;
border-top: 2px solid $main-color
}
class JobsController < ApplicationController
def show
@job = Job.find(params[:id])
end
end
<div class='col-md-6 col-sm-12 my-2'>
<div class='card'>
<div class='card-body'>
<%= link_to job.title, '#', class: 'card-title font-weight-bold text-decoration-none' %>
<%= link_to job.title, job_path(job), class: 'card-title font-weight-bold text-decoration-none' %>
<p class='card-text'><%= job.company.name %></p>
<p class='mb-0'>
<strong>Work place:</strong>
......
......@@ -8,14 +8,14 @@
</div>
<div id='latest-jobs' class='my-4 text-center'>
<h1>Latest Jobs</h1>
<hr>
<hr class="divider">
<div class='row'>
<%= render partial: 'home/job', collection: @jobs %>
</div>
</div>
<div id='top-cities' class='my-4 text-center'>
<h1>Top Cities</h1>
<hr>
<hr class="divider">
<div class='row'>
<%= render partial: 'locations/location', collection: @top_cities %>
</div>
......@@ -23,7 +23,7 @@
</div>
<div id='top-industries' class='my-4 text-center'>
<h1>Top Industries</h1>
<hr>
<hr class="divider">
<div class='row'>
<%= render partial: 'industries/industry', collection: @top_industries %>
</div>
......
<div id='industries' class='text-center my-3'>
<h2>Industries List</h2>
<hr>
<hr class="divider">
<div class='row'>
<%= render partial: 'industries/industry', collection: @industries %>
</div>
......
<nav aria-label='breadcrumb'>
<ol class='breadcrumb'>
<li class='breadcrumb-item'><%= link_to 'TOP', root_path %></li>
<li class='breadcrumb-item'><%= link_to @job.locations.first.city, root_path %></li>
<li class='breadcrumb-item'><%= link_to @job.industries.first.name, root_path %></li>
<li class='breadcrumb-item active' aria-current='page'><%= @job.title %></li>
</ol>
</nav>
<div class="row">
<div class="col-10">
<h2 class="font-weight-bold"><%= @job.title %></h2>
<h3><%= @job.company.name %></h3>
<h5><strong>Work places: </strong>
<i><%= @job.locations.map(&:city).join(' | ') %></i>
</h5>
<h5><strong>Industries: </strong>
<i><%= @job.industries.map(&:name).join(' | ') %></i>
</h5>
<h5><strong>Salary: </strong><%= @job.salary %></h5>
<hr>
<h3><strong>Description:</strong></h3>
<%= @job.description.html_safe %>
</div>
<div class="col-2">
<%= link_to 'Apply Now', '#', class: 'btn btn-outline-success btn-lg' %>
</div>
</div>
<div class="row my-3">
<div class="col-6 text-right">
<%= link_to 'Apply Now', '#', class: 'btn btn-outline-success btn-lg' %>
</div>
<div class="col-6 text-left">
<%= link_to 'Favorite', '#', class: 'btn btn-outline-danger btn-lg' %>
</div>
</div>
<div class='list my-3 text-center'>
<h2>Area List</h2>
<hr>
<hr class="divider">
<ul class='list-group list-group-horizontal justify-content-center'>
<li class='list-group-item'>
<a href='#vietnam'>Việt Nam</a>
......@@ -12,14 +12,14 @@
</div>
<div id='vietnam' class='text-center'>
<h2>Vietnam</h2>
<hr>
<hr class="divider">
<div class='row'>
<%= render partial: 'locations/location', collection: @vn_cities_lists %>
</div>
</div>
<div id='international' class='text-center'>
<h2>International</h2>
<hr>
<hr class="divider">
<div class="row">
<%= render partial: 'locations/location', collection: @internal_cities_lists %>
</div>
......
......@@ -2,5 +2,6 @@ Rails.application.routes.draw do
root to: 'home#index'
get 'cities', to: 'locations#index'
get 'industries', to: 'industries#index'
resources :jobs, only: :show
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
end
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