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
Huỳnh Thiên Phước
venjob
Commits
77bc1ccb
Commit
77bc1ccb
authored
Aug 11, 2020
by
Huỳnh Thiên Phước
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move convert.rb to helper file
parent
a26da0ac
Pipeline
#875
canceled with stages
in 0 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
12 deletions
+5
-12
app/assets/stylesheets/jobs.scss
+2
-11
app/helpers/convert.rb
+1
-1
app/views/jobs/detail.html.erb
+2
-0
No files found.
app/assets/stylesheets/jobs.scss
View file @
77bc1ccb
...
@@ -55,20 +55,11 @@
...
@@ -55,20 +55,11 @@
text-decoration
:
none
;
text-decoration
:
none
;
color
:
gray
;
color
:
gray
;
}
}
.
industry
:
:
after
{
.
industry
:
:
after
,
.
location
::
after
{
margin
:
5px
;
margin
:
5px
;
content
:
"|"
;
content
:
"|"
;
color
:
black
;
color
:
black
;
}
}
.industry
:nth-last-child
(
1
)
::after
{
.industry
:last-child::after
,
.location
:last-child::after
{
content
:
""
;
}
.
location
:
:
after
{
margin
:
5px
;
content
:
"|"
;
color
:
black
;
}
.location
:last-child::after
{
content
:
""
;
content
:
""
;
}
}
app/
common
/convert.rb
→
app/
helpers
/convert.rb
View file @
77bc1ccb
module
Convert
module
Convert
def
self
.
to_convert
(
str
)
def
to_convert
(
str
)
str
.
mb_chars
.
normalize
(
:kd
).
gsub
(
/[Đđ]/
,
'd'
).
gsub
(
/[^\x00-\x7F]/
,
''
).
gsub
(
/[\W+]/
,
' '
).
downcase
.
to_s
.
split
(
' '
).
join
(
'-'
)
str
.
mb_chars
.
normalize
(
:kd
).
gsub
(
/[Đđ]/
,
'd'
).
gsub
(
/[^\x00-\x7F]/
,
''
).
gsub
(
/[\W+]/
,
' '
).
downcase
.
to_s
.
split
(
' '
).
join
(
'-'
)
end
end
end
end
app/views/jobs/detail.html.erb
View file @
77bc1ccb
...
@@ -8,9 +8,11 @@
...
@@ -8,9 +8,11 @@
</div>
</div>
<div
class=
"breadcrumb"
>
<div
class=
"breadcrumb"
>
<%=
link_to
"TOP"
,
root_path
%>
 
/
 
<%=
link_to
"TOP"
,
root_path
%>
 
/
 
<div>
<%
@job_details
.
cities
.
each
do
|
city
|
%>
<%
@job_details
.
cities
.
each
do
|
city
|
%>
<%=
link_to
city
.
name
,
city_jobs_path
(
converted_name:
city
.
converted_name
)
,
class:
'location'
%>
<%=
link_to
city
.
name
,
city_jobs_path
(
converted_name:
city
.
converted_name
)
,
class:
'location'
%>
<%
end
%>
 
/
 
<%
end
%>
 
/
 
</div>
<%
@job_details
.
industries
.
each
do
|
industry
|
%>
<%
@job_details
.
industries
.
each
do
|
industry
|
%>
<%=
link_to
industry
.
name
,
industry_jobs_path
(
converted_name:
industry
.
converted_name
),
class:
'industry'
%>
<%=
link_to
industry
.
name
,
industry_jobs_path
(
converted_name:
industry
.
converted_name
),
class:
'industry'
%>
<%
end
%>
 
/
 
<%
end
%>
 
/
 
...
...
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