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
b31a4f53
Commit
b31a4f53
authored
Dec 02, 2019
by
nnnghia98
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
import companies
parent
722477b2
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
71 additions
and
10 deletions
+71
-10
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
+3
-1
config/routes.rb
+5
-2
lib/.~lock.jobss.csv#
+0
-2
No files found.
app/assets/stylesheets/custom.scss
View file @
b31a4f53
...
...
@@ -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 @
b31a4f53
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 @
b31a4f53
...
...
@@ -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 @
b31a4f53
<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 @
b31a4f53
<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 @
b31a4f53
...
...
@@ -8,7 +8,9 @@
<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 @
b31a4f53
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 @
722477b2
,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