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
2
Merge Requests
2
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
Hoang Nam Nguyen
Venjob
Commits
30dad39a
Commit
30dad39a
authored
Oct 10, 2017
by
Hoang Nam Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'finished fix review'
parent
be5a251e
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
61 additions
and
63 deletions
+61
-63
app/controllers/top_pages_controller.rb
+1
-1
app/models/history.rb
+1
-1
app/views/applies/_form_apply.html.erb
+47
-0
app/views/applies/new.html.erb
+8
-56
app/views/job/_search.html.erb
+2
-2
app/views/top_pages/_history.html.erb
+2
-2
app/views/users/_my_jobs.html.erb
+0
-1
No files found.
app/controllers/top_pages_controller.rb
View file @
30dad39a
...
@@ -17,7 +17,7 @@ class TopPagesController < ApplicationController
...
@@ -17,7 +17,7 @@ class TopPagesController < ApplicationController
def
history
def
history
@user
=
current_user
@user
=
current_user
@job
=
@user
.
histories
.
new_list_history
(
ENV
[
"NUMBER_HISTORY_PAGE"
])
@job
=
@user
.
histories
.
latest_histories
(
ENV
[
"NUMBER_HISTORY_PAGE"
])
end
end
def
favorite_job
def
favorite_job
...
...
app/models/history.rb
View file @
30dad39a
...
@@ -2,5 +2,5 @@ class History < ApplicationRecord
...
@@ -2,5 +2,5 @@ class History < ApplicationRecord
belongs_to
:user
belongs_to
:user
belongs_to
:job
belongs_to
:job
scope
:
new_list_history
,
->
(
num
)
{
order
(
id: :desc
).
limit
(
num
)}
scope
:
latest_histories
,
->
(
num
)
{
order
(
id: :desc
).
limit
(
num
)}
end
end
app/views/applies/_form_apply.html.erb
0 → 100644
View file @
30dad39a
<div
class=
"row mt-3"
>
<!--set field password -->
<div
class=
"col-md-2 mb-5"
>
<strong><i
class=
"text-danger"
>
<%=
f
.
label
:name
,
"Full Name"
,
class:
'form-label'
%>
</i></strong>
</div>
<!--set field password -->
<div
class=
"col-md-10"
>
<div
class=
"input-group"
>
<span
class=
"input-group-addon"
><i
class=
"fa fa-user fa"
aria-hidden=
"true"
></i></span>
<%=
f
.
text_field
:name
,
class:
'form-control'
%>
</div>
</div>
<!--end set field password -->
<!--set field email -->
<div
class=
"col-md-2"
>
<strong><i
class=
"text-danger"
>
<%=
f
.
label
:email
%>
</i></strong>
</div>
<!--set field email -->
<div
class=
"col-md-10"
>
<div
class=
"input-group"
>
<span
class=
"input-group-addon mb-5"
><i
class=
"fa fa-envelope"
aria-hidden=
"true"
></i></span>
<%=
f
.
email_field
:email
,
class:
'form-control mb-5'
%>
</div>
</div>
<!--end field email -->
<div
class=
"col-md-2"
>
<strong><i
class=
"text-danger"
>
My CV
</i></strong>
</div>
<%
if
current_user
.
cv?
%>
<div
class=
"col-md-10 mb-5 text-center"
>
<%=
link_to
'Download cv'
,
downloadcv_path
(
id:
@current_user
.
id
)
%>
</div>
<%
else
%>
<div
class =
"col-md-10 mb-5"
>
<%=
link_to
'Upload here'
,
edit_account_activation_path
(
id:
@current_user
.
id
)
%>
</div>
<%
end
%>
<!--end set field all -->
<div
class=
"col-sm-2"
></div>
<div
class=
"col-sm-10"
>
<%=
button_tag
(
type:
"submit"
,
class:
"btn btn-danger btn-block"
)
do
%>
<i
class=
"fa fa-check 4px"
></i>
Confirm
<%
end
%>
</div>
</div>
<!--end set button -->
\ No newline at end of file
app/views/applies/new.html.erb
View file @
30dad39a
...
@@ -19,60 +19,12 @@
...
@@ -19,60 +19,12 @@
<%
if
current_user
.
applied_job?
(
@apply_job
)
%>
<%
if
current_user
.
applied_job?
(
@apply_job
)
%>
<h2
class=
"text-center text-danger mt-5"
>
You applied this job
</h2>
<h2
class=
"text-center text-danger mt-5"
>
You applied this job
</h2>
<%
else
%>
<%
else
%>
<div
class=
"row ml-5 mt-5"
>
<div
class=
"row ml-5 mt-5"
>
<div
class=
"col-md-10 col-md-offset-3"
>
<div
class=
"col-md-10 col-md-offset-3"
>
<!--set message errors -->
<%=
form_for
(
@user_apply
,
url:
new_info_path
)
do
|
f
|
%>
<!--end set -->
<%=
render
'shared/error_user_apply'
%>
<!--set field all -->
<%=
render
'form_apply'
,
f:
f
%>
<%=
form_for
(
@user_apply
,
url:
new_info_path
)
do
|
f
|
%>
<%
end
%>
<%=
render
'shared/error_user_apply'
%>
</div>
<div
class=
"row mt-3"
>
<!--set field password -->
<div
class=
"col-md-2 mb-5"
>
<strong><i
class=
"text-danger"
>
<%=
f
.
label
:name
,
"Full Name"
,
class:
'form-label'
%>
</i></strong>
</div>
<!--set field password -->
<div
class=
"col-md-10"
>
<div
class=
"input-group"
>
<span
class=
"input-group-addon"
><i
class=
"fa fa-user fa"
aria-hidden=
"true"
></i></span>
<%=
f
.
text_field
:name
,
class:
'form-control'
%>
</div>
</div>
<!--end set field password -->
<!--set field email -->
<div
class=
"col-md-2"
>
<strong><i
class=
"text-danger"
>
<%=
f
.
label
:email
%>
</i></strong>
</div>
<!--set field email -->
<div
class=
"col-md-10"
>
<div
class=
"input-group"
>
<span
class=
"input-group-addon mb-5"
><i
class=
"fa fa-envelope"
aria-hidden=
"true"
></i></span>
<%=
f
.
email_field
:email
,
class:
'form-control mb-5'
%>
</div>
</div>
<!--end field email -->
<div
class=
"col-md-2"
>
<strong><i
class=
"text-danger"
>
My CV
</i></strong>
</div>
<%
if
current_user
.
cv?
%>
<div
class=
"col-md-10 mb-5 text-center"
>
<%=
link_to
'Download cv'
,
downloadcv_path
(
id:
@current_user
.
id
)
%>
</div>
<%
else
%>
<div
class =
"col-md-10 mb-5"
>
<%=
link_to
'Upload here'
,
edit_account_activation_path
(
id:
@current_user
.
id
)
%>
</div>
<%
end
%>
<!--end set field all -->
<div
class=
"col-sm-2"
></div>
<div
class=
"col-sm-10"
>
<%=
button_tag
(
type:
"submit"
,
class:
"btn btn-danger btn-block"
)
do
%>
<i
class=
"fa fa-check 4px"
></i>
Confirm
<%
end
%>
</div>
</div>
<!--end set button -->
<%
end
%>
<%
end
%>
</div>
</div>
<
/div
>
<
%
end
%
>
app/views/job/_search.html.erb
View file @
30dad39a
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<div
class=
"row mb-5"
>
<div
class=
"row mb-5"
>
<div
class=
"search_list titlejob col-md-10"
>
<div
class=
"search_list titlejob col-md-10"
>
<%=
link_to
job
[
'job_name'
].
join
(
','
),
job_detail_path
(
job
[
'job_id'
]),
class:
'search_list_jobs_title'
%>
<%=
link_to
job
[
'job_name'
].
join
(
','
),
job_detail_path
(
job
[
'job_id'
]),
class:
'search_list_jobs_title'
%>
<%
unless
job
[
'short_description'
].
nil
?
%>
<%
if
job
[
'short_description'
].
present
?
%>
<li
class=
"detail_description"
>
<li
class=
"detail_description"
>
<%=
truncate
job
[
'short_description'
].
join
(
','
)
,
length:
250
%>
<%=
truncate
job
[
'short_description'
].
join
(
','
)
,
length:
250
%>
<%=
link_to
'read more'
,
job_detail_path
(
job
[
'job_id'
])
%>
</li>
<%=
link_to
'read more'
,
job_detail_path
(
job
[
'job_id'
])
%>
</li>
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
<li
class=
"detail_description col-md-5"
>
<li
class=
"detail_description col-md-5"
>
<%=
job
[
'city_name'
].
join
(
','
)
%>
<%=
job
[
'city_name'
].
join
(
','
)
%>
</li>
</li>
<%
unless
job
[
'salary'
].
nil
?
%>
<%
if
job
[
'salary'
].
present
?
%>
<li
class=
" detail_description float-right text-success col-md-5"
>
<li
class=
" detail_description float-right text-success col-md-5"
>
<%=
job
[
'salary'
].
join
(
','
)
%>
<%=
job
[
'salary'
].
join
(
','
)
%>
</li>
</li>
...
...
app/views/top_pages/_history.html.erb
View file @
30dad39a
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<div
class=
"col-11"
>
<div
class=
"col-11"
>
<%=
link_to
history
.
job
.
job_title
,
job_detail_path
(
history
.
job
.
id
),
class:
'search_list_jobs_title'
%>
<%=
link_to
history
.
job
.
job_title
,
job_detail_path
(
history
.
job
.
id
),
class:
'search_list_jobs_title'
%>
<%
unless
history
.
job
.
short_description
.
nil
?
%>
<%
if
history
.
job
.
short_description
.
present
?
%>
<li
class=
"detail_description"
>
<li
class=
"detail_description"
>
<%=
truncate
history
.
job
.
short_description
,
length:
250
%>
<%=
truncate
history
.
job
.
short_description
,
length:
250
%>
<%=
link_to
'read more'
,
job_detail_path
(
history
.
job
.
id
)
%>
</li>
<%=
link_to
'read more'
,
job_detail_path
(
history
.
job
.
id
)
%>
</li>
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
<li
class=
"detail_description col-md-5"
>
<li
class=
"detail_description col-md-5"
>
<%=
history
.
job
.
cities
.
map
(
&
:location
).
join
(
','
)
%>
<%=
history
.
job
.
cities
.
map
(
&
:location
).
join
(
','
)
%>
</li>
</li>
<%
unless
history
.
job
.
salary
.
nil
?
%>
<%
if
history
.
job
.
salary
.
present
?
%>
<li
class=
" detail_description float-right text-success col-md-5"
>
<li
class=
" detail_description float-right text-success col-md-5"
>
<%=
history
.
job
.
salary
%>
<%=
history
.
job
.
salary
%>
</li>
</li>
...
...
app/views/users/_my_jobs.html.erb
View file @
30dad39a
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
<%=
link_to
apply
.
job
.
job_title
,
job_detail_path
(
apply
.
job
.
id
),
class:
'search_list_jobs_title'
%>
<%=
link_to
apply
.
job
.
job_title
,
job_detail_path
(
apply
.
job
.
id
),
class:
'search_list_jobs_title'
%>
<%
if
apply
.
job
.
short_description
.
present?
%>
<%
if
apply
.
job
.
short_description
.
present?
%>
<%=
binding
.
pry
%>
<li
class=
"detail_description"
>
<li
class=
"detail_description"
>
<%=
truncate
apply
.
job
.
short_description
,
length:
250
%>
<%=
truncate
apply
.
job
.
short_description
,
length:
250
%>
<%=
link_to
'read more'
,
job_detail_path
(
apply
.
job
.
id
)
%>
</li>
<%=
link_to
'read more'
,
job_detail_path
(
apply
.
job
.
id
)
%>
</li>
...
...
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