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
5f043334
Commit
5f043334
authored
Nov 02, 2017
by
Xuan Trung Le
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bugs
parent
f48d0933
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
26 additions
and
14 deletions
+26
-14
app/assets/javascripts/application.js
+1
-0
app/controllers/my_pages_controller.rb
+2
-2
app/controllers/passwords_controller.rb
+0
-4
app/views/applies/apply.html.erb
+1
-1
app/views/favorites/index.html.erb
+19
-6
app/views/jobs/job_lists.html.erb
+3
-1
public/uploads/tmp/1509594693-13364-0001-5679/mua_hong.pdf
+0
-0
vendor/assets/stylesheets/bootstrap-theme.min.css.map
+0
-0
vendor/assets/stylesheets/bootstrap.min.css.map
+0
-0
No files found.
app/assets/javascripts/application.js
View file @
5f043334
...
...
@@ -18,6 +18,7 @@
$
(
document
).
ready
(
function
(){
$
(
'.message'
).
delay
(
5000
).
fadeOut
(
'slow'
);
$
(
document
).
on
(
'change'
,
'input[name=job_id]'
,
function
(
event
)
{
event
.
preventDefault
();
$
(
'#apply'
).
removeAttr
(
'disabled'
)
});
});
app/controllers/my_pages_controller.rb
View file @
5f043334
...
...
@@ -9,11 +9,11 @@ class MyPagesController < ApplicationController
end
def
history
@jobs
=
current_user
.
viewed_jobs
.
includes
(
:apply_jobs
).
includes
(
:company
).
limit
(
Settings
.
top
.
job_per_history_page
)
@jobs
=
current_user
.
viewed_jobs
.
includes
(
:apply_jobs
,
:company
).
limit
(
Settings
.
top
.
job_per_history_page
)
end
def
download_cv
if
File
.
exist?
(
current_user
.
cv
.
path
)
if
current_user
.
cv
.
file
.
exists?
send_file
current_user
.
cv
.
path
else
flash
[
:notice
]
=
'File not exist!'
...
...
app/controllers/passwords_controller.rb
View file @
5f043334
class
PasswordsController
<
Devise
::
PasswordsController
def
new
super
end
def
edit
self
.
resource
=
User
.
with_reset_password_token
(
params
[
:reset_password_token
])
if
self
.
resource
...
...
app/views/applies/apply.html.erb
View file @
5f043334
...
...
@@ -5,7 +5,7 @@
<p
class=
"text-info"
>
1. Apply form
</p>
</div>
<div
class=
"form-horizontal"
>
<%=
form_for
(
@application
,
url:
confirm_applies_path
,
html:
{
method: :post
,
multipart:
true
})
do
|
f
|
%>
<%=
form_for
(
@application
,
url:
confirm_applies_path
,
html:
{
multipart:
true
})
do
|
f
|
%>
<div
class=
"form-group"
>
<%=
f
.
label
:Email
,
'Email:'
,
class:
"control-label col-md-2"
%>
<div
class=
"col-sm-10"
>
...
...
app/views/favorites/index.html.erb
View file @
5f043334
...
...
@@ -3,29 +3,42 @@
<div
class=
"jobs clearfix"
>
<div
class=
"job col-md-12"
>
<table
class=
"table"
>
<%=
form_tag
apply_applies_path
,
method: :get
do
%>
<tbody>
<%-
@jobs
.
each
do
|
job
|
-%>
<tr>
<td
class=
"col-md-1 position-relative"
>
<input
type=
"radio"
name=
"rbn-apply-job"
class=
"mid-heigth"
>
<%=
radio_button_tag
"job_id"
,
job
.
id
,
false
,
class:
"mid-heigth"
,
disabled:
user_has_applied?
(
job
)
?
true
:
false
%>
</td>
<td
class=
"col-md-9"
>
<h4
class=
"mr0"
>
<%=
link_to
job
.
name
,
job_path
(
job
)
%>
</h4>
<p>
<%=
"Loacation:
#{
job
.
company
.
location
}
"
%>
</p>
<p>
<%=
"Salary:
#{
job
.
salary
}
"
%>
</p>
<h4
class=
"mr0"
>
<%=
link_to
job
.
name
+
"
#{
user_has_applied?
(
job
)
?
' (APPLIED)'
:
''
}
"
,
job_path
(
job
)
%>
</h4>
<p><strong>
Description:
</strong>
<%=
strip_tags
(
job
.
description
)[
0
...
250
]
%>
...
</p>
<p>
<span>
<%=
"<strong>Loacation</strong>:
#{
job
.
company
.
location
}
"
.
html_safe
%>
</span>
<span
class=
"navbar-right"
>
<%=
"<strong>Salary</strong>:
#{
job
.
salary
}
"
.
html_safe
%>
</span>
</p>
</td>
<td
class=
"col-md-2 position-relative"
>
<%=
button
_to
"Remove"
,
<%=
link
_to
"Remove"
,
unlike_job_favorites_path
(
job_id:
job
.
id
),
method: :post
,
data:
{
confirm:
"Are you sure you want to remove this job?"
},
class:
"btn btn-danger btn-lg mid-heigth"
%>
</td>
</tr>
<%
end
%>
<tr>
<td></td>
<td>
<%=
submit_tag
"Applys"
,
class:
"btn btn-primary btn-lg btn-block"
,
id:
"apply"
,
disabled:
true
%>
</td>
<td></td>
</tr>
</tbody>
<%
end
%>
</table>
</div>
<%=
button_to
"Apply"
,
nil
,
class:
"btn btn-primary"
%>
</div>
</div>
</div>
app/views/jobs/job_lists.html.erb
View file @
5f043334
...
...
@@ -28,7 +28,9 @@
</div>
<div
class=
"col-md-2 favorite"
>
<%=
link_to
"FAVORITE"
,
"#"
,
class:
"btn btn-default"
%>
<%=
button_to
"Favorite"
,
job_favorites_path
(
job_id:
job
.
id
),
class:
"btn btn-primary btn-lg btn-block"
%>
</div>
</div>
<%-
end
-%>
...
...
public/uploads/tmp/1509594693-13364-0001-5679/mua_hong.pdf
0 → 100644
View file @
5f043334
File added
vendor/assets/stylesheets/bootstrap-theme.min.css.map
0 → 100644
View file @
5f043334
This diff is collapsed.
Click to expand it.
vendor/assets/stylesheets/bootstrap.min.css.map
0 → 100644
View file @
5f043334
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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