Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
VeNJOB
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
0
Merge Requests
0
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
Nguyen Ngoc Nghia
VeNJOB
Commits
8d6a634f
Commit
8d6a634f
authored
Dec 10, 2019
by
nnnghia98
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
paginate city
parent
c12a066f
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
59 additions
and
18 deletions
+59
-18
app/assets/stylesheets/custom.scss
+10
-0
app/controllers/cities_controller.rb
+1
-1
app/controllers/jobs_controller.rb
+1
-1
app/controllers/static_pages_controller.rb
+2
-2
app/views/cities/_city.html.erb
+1
-1
app/views/cities/index.html.erb
+24
-8
app/views/jobs/index.html.erb
+9
-1
app/views/static_pages/index.html.erb
+6
-3
config/settings.yml
+5
-1
lib/jobss.csv
+0
-0
No files found.
app/assets/stylesheets/custom.scss
View file @
8d6a634f
...
...
@@ -93,3 +93,13 @@ footer {
.flash-message
{
padding-top
:
15px
;
}
/* grid */
.col-show
{
border
:
1px
solid
black
;
border-radius
:
3px
;
text-align
:
center
;
margin
:
10px
;
padding
:
10px
;
}
app/controllers/cities_controller.rb
View file @
8d6a634f
class
CitiesController
<
ApplicationController
def
index
@cities
=
City
.
all
@cities
=
City
.
page
(
params
[
:page
]).
per
(
Settings
.
col
.
page
.
per
)
end
end
app/controllers/jobs_controller.rb
View file @
8d6a634f
class
JobsController
<
ApplicationController
def
index
@jobs
=
Job
.
all
@jobs
=
Job
.
page
(
params
[
:page
]).
per
(
Settings
.
table
.
page
.
per
)
end
end
app/controllers/static_pages_controller.rb
View file @
8d6a634f
class
StaticPagesController
<
ApplicationController
def
index
@cities
=
City
.
all
@cities
=
City
.
page
(
params
[
:page
]).
per
(
Settings
.
col
.
page
.
per
)
@industries
=
Industry
.
all
@jobs
=
Job
.
page
(
params
[
:page
]).
per
(
Settings
.
jobs
.
page
.
per
)
@jobs
=
Job
.
page
(
params
[
:page
]).
per
(
Settings
.
table
.
page
.
per
)
end
end
app/views/cities/_city.html.erb
View file @
8d6a634f
<
li
class=
"list-group-item"
>
<%=
city
.
name
%>
</li
>
<
div
class=
"col-show"
>
<%=
city
.
name
%>
</div
>
app/views/cities/index.html.erb
View file @
8d6a634f
<div
class=
"text-center"
>
<div
class=
"container jumbotron"
>
<h1>
City List
</h1>
<div
class=
"=row"
>
<a
href=
"#vietnam"
class=
"col-sm-6"
>
<div
class=
"tag"
>
Vietnam
</div>
</a>
<a
href=
"#interational"
class=
"col-sm-6"
>
<div
class=
"tag"
>
International
</div>
</a>
<div
class=
"row"
>
<div
class=
"col-sm"
>
<a
href=
"#vietnam"
>
<div
class=
"tag"
>
Vietnam
</div>
</a>
</div>
<div
class=
"col-sm"
>
<a
href=
"#interational"
>
<div
class=
"tag"
>
International
</div>
</a>
</div>
</div>
</div>
</div><br>
<%=
render
partial:
"cities/city"
,
collection:
@cities
%>
<div
class=
"container-fluid"
>
<div
class=
"tag text-center"
id=
"vietnam"
>
Vietnam
</div><br>
<div
class=
"container"
>
<div
class=
"row row-cols-5"
>
<%=
render
partial:
"cities/city"
,
collection:
@cities
%>
</div>
</div>
<%=
paginate
@cities
%>
</div><br>
<div
class=
"container-fluid"
>
<div
class=
"tag text-center"
id=
"interational"
>
International
</div><br>
</div><br>
app/views/jobs/index.html.erb
View file @
8d6a634f
<%=
render
partial:
"jobs/job"
,
collection:
@jobs
%>
<table
class=
"table"
>
<tbody>
<ul
class=
"table"
>
<%=
render
partial:
"jobs/job"
,
collection:
@jobs
%>
</ul>
</tbody>
</table>
<%=
paginate
@jobs
%>
app/views/static_pages/index.html.erb
View file @
8d6a634f
...
...
@@ -23,9 +23,12 @@
<div
class=
"top_cities"
>
<h3>
Top cities
</h3>
<ul
class=
"list-group list-group-horizontal"
>
<%=
render
partial:
"cities/city"
,
collection:
@cities
%>
</ul>
<div
class=
"container"
>
<div
class=
"row row-cols-5"
>
<%=
render
partial:
"cities/city"
,
collection:
@cities
%>
</div>
</div>
<%=
paginate
@cities
%>
</div>
<div
class=
"top_industries"
>
...
...
config/settings.yml
View file @
8d6a634f
jobs
:
table
:
page
:
per
:
5
col
:
page
:
per
:
12
lib/jobss.csv
View file @
8d6a634f
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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