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
5a71084e
Commit
5a71084e
authored
Dec 02, 2019
by
nnnghia98
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
import companies
parent
c81913ab
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
72 additions
and
13 deletions
+72
-13
app/assets/stylesheets/custom.scss
+38
-1
app/controllers/companies_controller.rb
+3
-0
app/models/company.rb
+1
-1
app/views/companies/index.html.erb
+20
-2
app/views/layouts/_header.html.erb
+1
-1
app/views/static_pages/top_page.html.erb
+4
-4
config/routes.rb
+5
-2
lib/.~lock.jobss.csv#
+0
-2
No files found.
app/assets/stylesheets/custom.scss
View file @
5a71084e
...
...
@@ -14,7 +14,7 @@ $light-gray: #777;
/* universal */
body
{
padding-top
:
3
0px
;
padding-top
:
9
0px
;
}
section
{
...
...
@@ -32,6 +32,33 @@ textarea {
}
}
/* typography */
h1
,
h2
,
h3
,
h4
,
h5
,
h6
{
line-height
:
1
;
}
h1
{
font-size
:
3em
;
letter-spacing
:
-2px
;
margin-bottom
:
30px
;
text-align
:
center
;
}
h2
{
font-size
:
1
.2em
;
letter-spacing
:
-1px
;
margin-bottom
:
30px
;
text-align
:
center
;
font-weight
:
normal
;
color
:
$light-gray
;
}
p
{
font-size
:
1
.1em
;
line-height
:
1
.7em
;
}
/* header */
/* footer */
...
...
@@ -50,3 +77,13 @@ footer {
}
}
}
/* miscellaneous */
.debug_dump
{
clear
:
both
;
float
:
left
;
width
:
100%
;
margin-top
:
45px
;
@include
box_sizing
;
}
app/controllers/companies_controller.rb
View file @
5a71084e
class
CompaniesController
<
ApplicationController
def
index
@companies
=
Company
.
all
end
def
import
Company
.
companies_import
redirect_to
companies_index_path
,
notice:
"Companies imported successful!"
end
end
app/models/company.rb
View file @
5a71084e
...
...
@@ -19,6 +19,6 @@ class Company < ApplicationRecord
companies
<<
{
name:
row
[
"company name"
],
email:
row
[
"contact email"
],
address:
row
[
"company address"
]}
end
C
it
y
.
import
columns
,
companies
,
on_duplicate_key_ignore:
true
C
ompan
y
.
import
columns
,
companies
,
on_duplicate_key_ignore:
true
end
end
app/views/companies/index.html.erb
View file @
5a71084e
<h1>
Companies#index
</h1>
<p>
Find me in app/views/companies/index.html.erb
</p>
<%=
flash
[
:notice
]
%>
<table
class=
"table"
>
<thead>
<tr>
<th
scope=
"col"
>
company name
</th>
<th
scope=
"col"
>
contact email
</th>
<th
scope=
"col"
>
company address
</th>
</tr>
</thead>
<tbody>
<%
@companies
.
each
do
|
company
|
%>
<tr>
<td>
<%=
company
.
name
%>
</td>
<td>
<%=
company
.
email
%>
</td>
<td>
<%=
company
.
address
%>
</td>
</tr>
<%
end
%>
</tbody>
</table>
app/views/layouts/_header.html.erb
View file @
5a71084e
<header
class=
"navbar
navbar-fixed-top navbar-inverse
navbar-dark bg-dark"
>
<header
class=
"navbar
fixed-top
navbar-dark bg-dark"
>
<div
class=
"container"
>
<%=
link_to
image_tag
(
"venjob_logo.png"
,
alt:
"VeNJOB Logo"
)
,
root_path
,
id:
"logo"
%>
<nav>
...
...
app/views/static_pages/top_page.html.erb
View file @
5a71084e
<h1>
VeNJOB Top page
</h1>
<div
class=
"container"
>
<div
class=
"center jumbotron"
>
<div
class=
"banner"
>
<img
src=
"banner.png"
alt=
"Banner"
>
</div>
<div
class=
"search"
></div>
<div
class=
"lastest_jobs"
></div>
<div
class=
"lastest_jobs"
>
<h3>
Latest jobs
</h3>
</div>
<div
class=
"top_cities"
>
<h3>
Top cities
</h3>
...
...
config/routes.rb
View file @
5a71084e
Rails
.
application
.
routes
.
draw
do
get
'companies/index'
get
'companies/import'
get
"companies/index"
get
"companies/import"
resources
:companies
do
collection
{
post
:import
}
end
get
"industries/index"
get
"industries/import"
resources
:industries
do
...
...
lib/.~lock.jobss.csv#
deleted
100644 → 0
View file @
c81913ab
,nghiann,devops-OptiPlex-3020,29.11.2019 16:15,file:///home/nghiann/.config/libreoffice/4;
\ No newline at end of file
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