Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
venjob_thanhnd
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
3
Merge Requests
3
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
thanhnd
venjob_thanhnd
Commits
4ac4147c
Commit
4ac4147c
authored
Feb 28, 2020
by
thanhnd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
detail job
parent
8ea07e52
Pipeline
#488
failed with stages
in 0 seconds
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
86 additions
and
0 deletions
+86
-0
app/assets/stylesheets/application.scss
+42
-0
app/controllers/jobs_controller.rb
+6
-0
app/models/job.rb
+1
-0
app/views/jobs/detail.html.erb
+36
-0
config/routes.rb
+1
-0
No files found.
app/assets/stylesheets/application.scss
View file @
4ac4147c
...
...
@@ -78,3 +78,45 @@ ul.class-name li {
justify-content
:
flex-end
;
}
ul
.breadcrumb
{
padding
:
10px
16px
;
list-style
:
none
;
background-color
:
#eee
;
}
ul
.breadcrumb
li
{
display
:
inline
;
font-size
:
18px
;
color
:
#0275d8
;
}
ul
.breadcrumb
li
+
li
:before
{
padding
:
8px
;
color
:
black
;
content
:
"/\00a0"
;
}
ul
.breadcrumb
li
a
{
color
:
#0275d8
;
text-decoration
:
none
;
}
ul
.breadcrumb
li
a
:hover
{
color
:
black
;
text-decoration
:
underline
;
}
.button
{
background-color
:
#4CAF50
;
/* Green */
border
:
none
;
color
:
white
;
padding
:
20px
;
text-align
:
center
;
text-decoration
:
none
;
display
:
inline-block
;
font-size
:
16px
;
margin
:
4px
2px
;
cursor
:
pointer
;
align
:
center
}
.button1
{
border-radius
:
4px
;}
.button2
{
border-radius
:
4px
;}
app/controllers/jobs_controller.rb
0 → 100644
View file @
4ac4147c
class
JobsController
<
ApplicationController
def
detail
job_id
=
params
[
:id
]
@job_detail
=
Job
.
find
(
job_id
)
end
end
app/models/job.rb
View file @
4ac4147c
...
...
@@ -8,4 +8,5 @@ class Job < ApplicationRecord
belongs_to
:company
validates_presence_of
:job_name
scope
:latest_job
,
->
{
order
(
:last_updated
).
first
(
5
)}
#scope :detail_job, ->{joins(:company, :city).select('jobs.id,job_name,city_name,company_name,salary,description')}
end
app/views/jobs/detail.html.erb
0 → 100644
View file @
4ac4147c
<div
id=
"search"
class=
"container p-5 my-2 bg-secondary text-white"
>
<!-- Search form -->
<form
class=
"form-inline md-form mr-auto mb-4"
>
<input
class=
"form-control mr-sm-2"
type=
"text"
placeholder=
"Search"
aria-label=
"Search"
>
<button
class=
"btn btn-outline-warning btn-rounded btn-sm my-0"
type=
"submit"
>
Search
</button>
</form>
</div>
<div
id=
"job_detail"
class=
"container p-5 my-2 bg-secondary text-white"
>
<ul
class=
"breadcrumb"
>
<li><a
href=
"#"
>
Top
</a></li>
<li><a
href=
"#"
>
City
</a></li>
<li><a
href=
"#"
>
Industry
</a></li>
<li>
<%=
@job_detail
.
job_name
%>
</li>
</ul>
<font
color=
"red"
><b><label
>
Job Detail:
</label></b></font>
<ul>
<li>
<%=
@job_detail
.
job_name
%>
</li>
<li>
<%=
@job_detail
.
company
.
company_name
%>
</li>
<li>
<%=
@job_detail
.
city
.
city_name
%>
</li>
<li>
<%=
@job_detail
.
salary
%>
</li>
<li
><span
class=
"text"
>
<%=
@job_detail
.
description
%>
</span>
</li>
</ul>
<button
class=
"button button1"
>
Apply
</button>
<button
class=
"button button2"
>
Favorites
</button>
</div>
config/routes.rb
View file @
4ac4147c
Rails
.
application
.
routes
.
draw
do
get
'/detail/:id'
,
to:
'jobs#detail'
root
'top_page#index'
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
resources
:top_page
...
...
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