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
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xuan Trung Le
venjob
Commits
bc1b104a
Commit
bc1b104a
authored
Oct 19, 2017
by
Xuan Trung Le
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update flash_message
parent
81c4f237
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
17 deletions
+6
-17
app/assets/javascripts/application.js
+4
-0
app/models/industry.rb
+0
-16
app/views/layouts/_flash.html.erb
+1
-1
app/views/layouts/application.html.erb
+1
-0
public/uploads/tmp/1508401465-2340-0001-2771/VeNJOB.xlsx
+0
-0
No files found.
app/assets/javascripts/application.js
View file @
bc1b104a
...
...
@@ -14,3 +14,7 @@
//= require_tree .
//= require javascripts/jquery-3.2.1.min.js
//= require javascripts/bootstrap.min.js
$
(
document
).
ready
(
function
(){
$
(
'#message'
).
delay
(
5000
).
fadeOut
(
'slow'
);
});
app/models/industry.rb
View file @
bc1b104a
class
Industry
<
ApplicationRecord
<<<<<<<
28
eda34d875adbaa9af263755cbdb98465bc5939
has_many
:industries_jobs
has_many
:jobs
,
through: :industries_jobs
...
...
@@ -11,19 +10,4 @@ class Industry < ApplicationRecord
order
(
jobs_count: :desc
)
}
scope
:availble_job
,
->
{
where
(
'jobs_count > 0'
)}
=======
has_and_belongs_to_many
:jobs
scope
:top_industries
,
->
{
select
(
'industries.id, industries.name AS name, COUNT(jobs.id) AS jobs_count'
).
joins
(
:jobs
).
group
(
'industries.id'
).
order
(
'jobs_count DESC, name'
).
limit
(
9
)
}
scope
:industry_list
,
->
{
select
(
'industries.id, industries.name AS name, COUNT(jobs.id) AS jobs_count'
).
joins
(
:jobs
)
.
# where('jobs_count >= 1').
group
(
'industries.id'
).
order
(
'jobs_count DESC, name'
)
}
>>>>>>>
Create
the
TOP
,
industry_list
,
city_list
,
job_detail
pages
.
end
app/views/layouts/_flash.html.erb
View file @
bc1b104a
<%
flash
.
each
do
|
name
,
msg
|
%>
<div
class=
"alert alert-info alert-dismissable fade in"
style=
"position: fixed; right: 0"
>
<div
class=
"alert alert-info alert-dismissable fade in"
style=
"position: fixed; right: 0"
id=
"message"
>
<a
href=
"#"
class=
"close"
data-dismiss=
"alert"
aria-label=
"close"
>
×
</a>
<strong>
<%=
"
#{
name
}
!"
%>
</strong>
<%=
msg
%>
</div>
...
...
app/views/layouts/application.html.erb
View file @
bc1b104a
...
...
@@ -10,6 +10,7 @@
<body>
<%=
render
"layouts/menu"
%>
<%=
render
"layouts/flash"
%>
<%=
yield
%>
<%=
render
"layouts/footer"
%>
</body>
...
...
public/uploads/tmp/1508401465-2340-0001-2771/VeNJOB.xlsx
0 → 100644
View file @
bc1b104a
File added
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