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
Thanh Hung Pham
veNJOB
Commits
45cb0dd9
Commit
45cb0dd9
authored
Jul 24, 2017
by
Thanh Hung Pham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix comment - change <%- -%> to <% %>
parent
6300126d
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
85 additions
and
86 deletions
+85
-86
app/views/categories/index.html.erb
+5
-5
app/views/cities/index.html.erb
+9
-9
app/views/devise/confirmations/information.html.erb
+2
-2
app/views/devise/confirmations/new.html.erb
+1
-1
app/views/devise/passwords/edit.html.erb
+1
-1
app/views/devise/passwords/new.html.erb
+1
-1
app/views/devise/registrations/edit.html.erb
+1
-1
app/views/devise/registrations/new.html.erb
+1
-1
app/views/devise/registrations/show.html.erb
+1
-1
app/views/devise/sessions/new.html.erb
+3
-3
app/views/devise/shared/_links.html.erb
+6
-6
app/views/errors/error_404.html.erb
+1
-1
app/views/jobs/applied_jobs.html.erb
+3
-3
app/views/jobs/apply.html.erb
+2
-2
app/views/jobs/confirm.html.erb
+2
-2
app/views/jobs/done.html.erb
+1
-1
app/views/jobs/favorited_jobs.html.erb
+3
-3
app/views/jobs/history_jobs.html.erb
+3
-3
app/views/jobs/index.html.erb
+8
-8
app/views/jobs/show.html.erb
+19
-19
app/views/layouts/_header.html.erb
+3
-4
app/views/sessions/new.html.erb
+2
-2
app/views/static_pages/home.html.erb
+7
-7
No files found.
app/views/categories/index.html.erb
View file @
45cb0dd9
<%
-
provide
(
'title'
,
'Industries'
)
-
%>
<%
provide
(
'title'
,
'Industries'
)
%>
<div
class=
"well"
>
<div
class=
"well"
>
<h3>
Industry list
</h3>
<h3>
Industry list
</h3>
<div
class=
"list_categories"
>
<div
class=
"list_categories"
>
<div
class=
"row"
>
<div
class=
"row"
>
<%
-
@categories
.
each
do
|
category
|
-
%>
<%
@categories
.
each
do
|
category
|
%>
<%
-
if
category
.
job_category
.
count
>
0
-
%>
<%
if
category
.
job_category
.
count
>
0
%>
<div
class=
"col-md-3"
>
<div
class=
"col-md-3"
>
<%=
link_to
category
.
name
,
category_path
(
category
.
id
)
%>
<%=
link_to
category
.
name
,
category_path
(
category
.
id
)
%>
(
<%=
pluralize
(
category
.
job_category
.
count
,
'job'
)
%>
)
(
<%=
pluralize
(
category
.
job_category
.
count
,
'job'
)
%>
)
</div>
</div>
<%
-
end
-
%>
<%
end
%>
<%
-
end
-
%>
<%
end
%>
</div>
</div>
</div>
</div>
</div>
</div>
app/views/cities/index.html.erb
View file @
45cb0dd9
<%
-
provide
(
:title
,
'Cities'
)
-
%>
<%
provide
(
:title
,
'Cities'
)
%>
<div
class=
"well"
>
<div
class=
"well"
>
<h3>
City list
</h3>
<h3>
City list
</h3>
<div
class=
"list_areas"
>
<div
class=
"list_areas"
>
<div
class=
"row"
>
<div
class=
"row"
>
<%
-
@areas
.
each
do
|
area
|
-
%>
<%
@areas
.
each
do
|
area
|
%>
<div
class=
"col-md-6"
>
<div
class=
"col-md-6"
>
<h4>
<%=
area
.
name
%>
</h4>
<h4>
<%=
area
.
name
%>
</h4>
</div>
</div>
<%
-
end
-
%>
<%
end
%>
</div>
</div>
</div>
</div>
</div>
</div>
<%
-
@areas
.
each
do
|
area
|
-
%>
<%
@areas
.
each
do
|
area
|
%>
<div
class=
"well"
>
<div
class=
"well"
>
<h3>
<%=
area
.
name
%>
</h3>
<h3>
<%=
area
.
name
%>
</h3>
<div
class=
"row"
>
<div
class=
"row"
>
<%
-
Area
.
get_city_by_area
(
area
).
each
do
|
city
|
-
%>
<%
Area
.
get_city_by_area
(
area
).
each
do
|
city
|
%>
<%
-
if
city
.
job
.
count
>
0
-
%>
<%
if
city
.
job
.
count
>
0
%>
<div
class=
"col-md-4"
>
<div
class=
"col-md-4"
>
<%=
link_to
city
.
name
,
city_path
(
city
.
id
)
%>
<%=
link_to
city
.
name
,
city_path
(
city
.
id
)
%>
(
<%=
pluralize
(
city
.
job
.
count
,
'job'
)
%>
)
(
<%=
pluralize
(
city
.
job
.
count
,
'job'
)
%>
)
</div>
</div>
<%
-
end
-
%>
<%
end
%>
<%
-
end
-
%>
<%
end
%>
</div>
</div>
</div>
</div>
<%
-
end
-
%>
<%
end
%>
app/views/devise/confirmations/information.html.erb
View file @
45cb0dd9
<%
-
provide
(
:title
,
'Complete information'
)
-
%>
<%
provide
(
:title
,
'Complete information'
)
%>
<div
class=
"well"
>
<div
class=
"well"
>
<h2>
Register
</h2>
<h2>
Register
</h2>
...
@@ -34,5 +34,5 @@
...
@@ -34,5 +34,5 @@
<div
class=
"actions"
>
<div
class=
"actions"
>
<%=
f
.
submit
"Register"
,
class:
'btn btn-primary'
%>
<%=
f
.
submit
"Register"
,
class:
'btn btn-primary'
%>
</div>
</div>
<%
-
end
-
%>
<%
end
%>
</div>
</div>
app/views/devise/confirmations/new.html.erb
View file @
45cb0dd9
<%
-
provide
(
:title
,
'Invalid link'
)
-
%>
<%
provide
(
:title
,
'Invalid link'
)
%>
<div
class=
"well"
>
<div
class=
"well"
>
<h2>
Register
</h2>
<h2>
Register
</h2>
<p>
<p>
...
...
app/views/devise/passwords/edit.html.erb
View file @
45cb0dd9
<%
-
provide
(
:title
,
'Change password'
)
-
%>
<%
provide
(
:title
,
'Change password'
)
%>
<div
class=
"well"
>
<div
class=
"well"
>
<h2>
Change your password
</h2>
<h2>
Change your password
</h2>
...
...
app/views/devise/passwords/new.html.erb
View file @
45cb0dd9
<%
-
provide
(
:title
,
'Forgot password'
)
-
%>
<%
provide
(
:title
,
'Forgot password'
)
%>
<div
class=
"well"
>
<div
class=
"well"
>
<h2>
Forgot your password?
</h2>
<h2>
Forgot your password?
</h2>
...
...
app/views/devise/registrations/edit.html.erb
View file @
45cb0dd9
<%
-
provide
(
:title
,
'My Page'
)
-
%>
<%
provide
(
:title
,
'My Page'
)
%>
<div
class=
"well"
>
<div
class=
"well"
>
<h2>
My Page
</h2>
<h2>
My Page
</h2>
...
...
app/views/devise/registrations/new.html.erb
View file @
45cb0dd9
<%
-
provide
(
:title
,
'Register'
)
-
%>
<%
provide
(
:title
,
'Register'
)
%>
<div
class=
"well"
>
<div
class=
"well"
>
<h2>
Register
</h2>
<h2>
Register
</h2>
<%=
form_for
(
resource
,
as:
resource_name
,
url:
registration_path
(
resource_name
))
do
|
f
|
%>
<%=
form_for
(
resource
,
as:
resource_name
,
url:
registration_path
(
resource_name
))
do
|
f
|
%>
...
...
app/views/devise/registrations/show.html.erb
View file @
45cb0dd9
<%
-
provide
(
:title
,
'My Page'
)
-
%>
<%
provide
(
:title
,
'My Page'
)
%>
<div
class=
"well"
>
<div
class=
"well"
>
<h2>
My Page
</h2>
<h2>
My Page
</h2>
...
...
app/views/devise/sessions/new.html.erb
View file @
45cb0dd9
<%
-
provide
(
:title
,
'Login'
)
-
%>
<%
provide
(
:title
,
'Login'
)
%>
<div
class=
"well"
>
<div
class=
"well"
>
<h2>
Log in
</h2>
<h2>
Log in
</h2>
...
@@ -11,9 +11,9 @@
...
@@ -11,9 +11,9 @@
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<%=
f
.
label
:password
%>
<br
/>
<%=
f
.
label
:password
%>
<br
/>
<%=
f
.
password_field
:password
,
autocomplete:
"off"
,
class:
'form-control'
%>
<%=
f
.
password_field
:password
,
autocomplete:
"off"
,
class:
'form-control'
%>
<%
-
if
devise_mapping
.
recoverable?
&&
controller_name
!=
'passwords'
&&
controller_name
!=
'registrations'
%>
<%
if
devise_mapping
.
recoverable?
&&
controller_name
!=
'passwords'
&&
controller_name
!=
'registrations'
%>
<%=
link_to
"Forgot your password?"
,
new_password_path
(
resource_name
)
%>
<br
/>
<%=
link_to
"Forgot your password?"
,
new_password_path
(
resource_name
)
%>
<br
/>
<%
end
-
%>
<%
end
%>
</div>
</div>
<div
class=
"form_group"
>
<div
class=
"form_group"
>
...
...
app/views/devise/shared/_links.html.erb
View file @
45cb0dd9
<%
-
if
controller_name
!=
'sessions'
%>
<%
if
controller_name
!=
'sessions'
%>
<%=
link_to
"Log in"
,
new_session_path
(
resource_name
)
%>
<br
/>
<%=
link_to
"Log in"
,
new_session_path
(
resource_name
)
%>
<br
/>
<%
end
-
%>
<%
end
%>
<%
-
if
devise_mapping
.
omniauthable?
%>
<%
if
devise_mapping
.
omniauthable?
%>
<%
-
resource_class
.
omniauth_providers
.
each
do
|
provider
|
%>
<%
resource_class
.
omniauth_providers
.
each
do
|
provider
|
%>
<%=
link_to
"Sign in with
#{
OmniAuth
::
Utils
.
camelize
(
provider
)
}
"
,
omniauth_authorize_path
(
resource_name
,
provider
)
%>
<br
/>
<%=
link_to
"Sign in with
#{
OmniAuth
::
Utils
.
camelize
(
provider
)
}
"
,
omniauth_authorize_path
(
resource_name
,
provider
)
%>
<br
/>
<%
end
-
%>
<%
end
%>
<%
end
-
%>
<%
end
%>
app/views/errors/error_404.html.erb
View file @
45cb0dd9
<%
-
provide
(
:title
,
'Errors'
)
-
%>
<%
provide
(
:title
,
'Errors'
)
%>
<div
class=
"well"
>
<div
class=
"well"
>
<h2>
404 - Not Found
</h2>
<h2>
404 - Not Found
</h2>
</div>
</div>
app/views/jobs/applied_jobs.html.erb
View file @
45cb0dd9
<%
-
provide
(
:title
,
'Applied jobs'
)
-
%>
<%
provide
(
:title
,
'Applied jobs'
)
%>
<div
class=
"well"
>
<div
class=
"well"
>
<h2>
Applied Jobs
</h2>
<h2>
Applied Jobs
</h2>
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<th
style=
"width: 100px;"
>
Applied At
</th>
<th
style=
"width: 100px;"
>
Applied At
</th>
</thead>
</thead>
<tbody>
<tbody>
<%
-
@applied_jobs
.
each
do
|
apply
|
-
%>
<%
@applied_jobs
.
each
do
|
apply
|
%>
<tr>
<tr>
<td>
<%=
link_to
apply
.
job
.
name
,
job_path
(
apply
.
job
.
id
)
%>
</td>
<td>
<%=
link_to
apply
.
job
.
name
,
job_path
(
apply
.
job
.
id
)
%>
</td>
<td>
<%=
truncate
(
apply
.
job
.
description
,
length:
250
)
%>
</td>
<td>
<%=
truncate
(
apply
.
job
.
description
,
length:
250
)
%>
</td>
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
<td>
<%=
apply
.
applied_at
.
strftime
(
'%F'
)
%>
</td>
<td>
<%=
apply
.
applied_at
.
strftime
(
'%F'
)
%>
</td>
<td>
</td>
<td>
</td>
</tr>
</tr>
<%
-
end
-
%>
<%
end
%>
</tbody>
</tbody>
</table>
</table>
</div>
</div>
...
...
app/views/jobs/apply.html.erb
View file @
45cb0dd9
<%
-
provide
(
:title
,
'Job Apply'
)
-
%>
<%
provide
(
:title
,
'Job Apply'
)
%>
<div
class=
"well"
>
<div
class=
"well"
>
<div>
<div>
<strong>
<%=
link_to
'Apply New'
,
jobs_apply_path
%>
</strong>
<strong>
<%=
link_to
'Apply New'
,
jobs_apply_path
%>
</strong>
...
@@ -27,5 +27,5 @@
...
@@ -27,5 +27,5 @@
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<%=
f
.
submit
'Confirm'
,
class:
'btn btn-primary'
%>
<%=
f
.
submit
'Confirm'
,
class:
'btn btn-primary'
%>
</div>
</div>
<%
-
end
-
%>
<%
end
%>
</div>
</div>
app/views/jobs/confirm.html.erb
View file @
45cb0dd9
<%
-
provide
(
:title
,
'Confirmation'
)
-
%>
<%
provide
(
:title
,
'Confirmation'
)
%>
<div
class=
"well"
>
<div
class=
"well"
>
<div>
<div>
<%=
link_to
'Apply New'
,
jobs_apply_path
%>
<%=
link_to
'Apply New'
,
jobs_apply_path
%>
...
@@ -27,5 +27,5 @@
...
@@ -27,5 +27,5 @@
<%=
link_to
'Edit'
,
jobs_apply_path
,
class:
'btn btn-primary'
%>
<%=
link_to
'Edit'
,
jobs_apply_path
,
class:
'btn btn-primary'
%>
<%=
f
.
submit
'Done'
,
class:
'btn btn-primary'
%>
<%=
f
.
submit
'Done'
,
class:
'btn btn-primary'
%>
</div>
</div>
<%
-
end
-
%>
<%
end
%>
</div>
</div>
app/views/jobs/done.html.erb
View file @
45cb0dd9
<%
-
provide
(
:title
,
'Apply Done'
)
-
%>
<%
provide
(
:title
,
'Apply Done'
)
%>
<div
class=
"well"
>
<div
class=
"well"
>
<div>
<div>
<%=
link_to
'Apply New'
,
jobs_apply_path
%>
<%=
link_to
'Apply New'
,
jobs_apply_path
%>
...
...
app/views/jobs/favorited_jobs.html.erb
View file @
45cb0dd9
<%
-
provide
(
:title
,
'Favorited Jobs'
)
-
%>
<%
provide
(
:title
,
'Favorited Jobs'
)
%>
<div
class=
"well"
>
<div
class=
"well"
>
<h2>
Favorited Jobs
</h2>
<h2>
Favorited Jobs
</h2>
<div
class=
"table-responsive"
>
<div
class=
"table-responsive"
>
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<th></th>
<th></th>
</thead>
</thead>
<tbody>
<tbody>
<%
-
@favorited_jobs
.
each
do
|
favorite
|
-
%>
<%
@favorited_jobs
.
each
do
|
favorite
|
%>
<tr
id=
"favorite_remove_
<%=
favorite
.
job
.
id
%>
"
>
<tr
id=
"favorite_remove_
<%=
favorite
.
job
.
id
%>
"
>
<td>
<%=
link_to
favorite
.
job
.
name
,
job_path
(
favorite
.
job
.
id
)
%>
</td>
<td>
<%=
link_to
favorite
.
job
.
name
,
job_path
(
favorite
.
job
.
id
)
%>
</td>
<td>
<%=
truncate
(
favorite
.
job
.
description
,
length:
250
)
%>
</td>
<td>
<%=
truncate
(
favorite
.
job
.
description
,
length:
250
)
%>
</td>
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
<input
type=
"hidden"
id=
"job_id"
name=
"job_id"
value=
"
<%=
favorite
.
job
.
id
%>
"
>
<input
type=
"hidden"
id=
"job_id"
name=
"job_id"
value=
"
<%=
favorite
.
job
.
id
%>
"
>
</td>
</td>
</tr>
</tr>
<%
-
end
-
%>
<%
end
%>
</tbody>
</tbody>
</table>
</table>
</div>
</div>
...
...
app/views/jobs/history_jobs.html.erb
View file @
45cb0dd9
<%
-
provide
(
:title
,
'History Jobs'
)
-
%>
<%
provide
(
:title
,
'History Jobs'
)
%>
<div
class=
"well"
>
<div
class=
"well"
>
<h2>
History Jobs
</h2>
<h2>
History Jobs
</h2>
<div
class=
"table-responsive"
>
<div
class=
"table-responsive"
>
...
@@ -10,14 +10,14 @@
...
@@ -10,14 +10,14 @@
<th>
Salary
</th>
<th>
Salary
</th>
</thead>
</thead>
<tbody>
<tbody>
<%
-
@history_jobs
.
each
do
|
history
|
-
%>
<%
@history_jobs
.
each
do
|
history
|
%>
<tr>
<tr>
<td>
<%=
link_to
history
.
job
.
name
,
job_path
(
history
.
job
.
id
)
%>
</td>
<td>
<%=
link_to
history
.
job
.
name
,
job_path
(
history
.
job
.
id
)
%>
</td>
<td>
<%=
truncate
(
history
.
job
.
description
,
length:
250
)
%>
</td>
<td>
<%=
truncate
(
history
.
job
.
description
,
length:
250
)
%>
</td>
<td>
<%=
history
.
job
.
city
.
try
(
:name
)
%>
</td>
<td>
<%=
history
.
job
.
city
.
try
(
:name
)
%>
</td>
<td>
<%=
history
.
job
.
salary
%>
</td>
<td>
<%=
history
.
job
.
salary
%>
</td>
</tr>
</tr>
<%
-
end
-
%>
<%
end
%>
</tbody>
</tbody>
</table>
</table>
</div>
</div>
...
...
app/views/jobs/index.html.erb
View file @
45cb0dd9
<%
-
provide
(
:title
,
'Job list'
)
-
%>
<%
provide
(
:title
,
'Job list'
)
%>
<div
class=
"well"
>
<div
class=
"well"
>
<%=
render
'layouts/search.html.erb'
%>
<%=
render
'layouts/search.html.erb'
%>
</div>
</div>
...
@@ -27,26 +27,26 @@
...
@@ -27,26 +27,26 @@
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
<%
-
@jobs
.
each
do
|
job
|
-
%>
<%
@jobs
.
each
do
|
job
|
%>
<tr>
<tr>
<td>
<%=
link_to
job
.
name
,
job_path
(
job
.
id
)
%>
</td>
<td>
<%=
link_to
job
.
name
,
job_path
(
job
.
id
)
%>
</td>
<td>
<%=
truncate
(
job
.
description
,
length:
250
)
%>
</td>
<td>
<%=
truncate
(
job
.
description
,
length:
250
)
%>
</td>
<td>
<%=
job
.
city
.
try
(
:name
)
%>
</td>
<td>
<%=
job
.
city
.
try
(
:name
)
%>
</td>
<td>
<%=
job
.
salary
%>
</td>
<td>
<%=
job
.
salary
%>
</td>
<td>
<td>
<%
-
if
Favorite
.
where
(
user:
current_user
,
job:
job
).
blank?
-
%>
<%
if
Favorite
.
where
(
user:
current_user
,
job:
job
).
blank?
%>
<div
class=
"col-md-3"
id=
"favorite_
<%=
job
.
id
%>
"
>
<div
class=
"col-md-3"
id=
"favorite_
<%=
job
.
id
%>
"
>
<%
-
if
user_signed_in?
-
%>
<%
if
user_signed_in?
%>
<%=
link_to
'Favorite'
,
jobs_favorite_path
(
job_id:
job
.
id
,
format:
'js'
),
remote:
true
,
class:
'favorite_add'
%>
<%=
link_to
'Favorite'
,
jobs_favorite_path
(
job_id:
job
.
id
,
format:
'js'
),
remote:
true
,
class:
'favorite_add'
%>
<%
-
else
-
%>
<%
else
%>
<%=
link_to
'Favorite'
,
new_user_session_path
%>
<%=
link_to
'Favorite'
,
new_user_session_path
%>
<%
-
end
-
%>
<%
end
%>
<input
type=
"hidden"
id=
"job_id"
name=
"job_id"
value=
"
<%=
job
.
id
%>
"
>
<input
type=
"hidden"
id=
"job_id"
name=
"job_id"
value=
"
<%=
job
.
id
%>
"
>
</div>
</div>
<%
-
end
-
%>
<%
end
%>
</td>
</td>
</tr>
</tr>
<%
-
end
-
%>
<%
end
%>
</tbody>
</tbody>
</table>
</table>
</div>
</div>
...
...
app/views/jobs/show.html.erb
View file @
45cb0dd9
<%
-
provide
(
:title
,
'Job Detail'
)
-
%>
<%
provide
(
:title
,
'Job Detail'
)
%>
<div
class=
"well"
>
<div
class=
"well"
>
<h2>
<%=
@job
.
name
%>
</h2>
<h2>
<%=
@job
.
name
%>
</h2>
<div
class=
"row form-group"
>
<div
class=
"row form-group"
>
...
@@ -21,38 +21,38 @@
...
@@ -21,38 +21,38 @@
</div>
</div>
</div>
</div>
<div
class=
"col-md-2"
>
<div
class=
"col-md-2"
>
<%
-
if
user_signed_in?
-
%>
<%
if
user_signed_in?
%>
<%
-
if
Apply
.
where
(
user:
current_user
,
job:
@job
).
blank?
-
%>
<%
if
Apply
.
where
(
user:
current_user
,
job:
@job
).
blank?
%>
<%=
link_to
'Apply'
,
jobs_apply_path
(
job_id:
@job
.
id
),
class:
'btn btn-primary'
%>
<%=
link_to
'Apply'
,
jobs_apply_path
(
job_id:
@job
.
id
),
class:
'btn btn-primary'
%>
<%
-
else
-
%>
<%
else
%>
<%=
link_to
'Applied'
,
'#'
,
class:
'btn btn-primary'
%>
<%=
link_to
'Applied'
,
'#'
,
class:
'btn btn-primary'
%>
<%
-
end
-
%>
<%
end
%>
<%
-
else
-
%>
<%
else
%>
<%=
link_to
'Apply'
,
new_user_session_path
,
class:
'btn btn-primary'
%>
<%=
link_to
'Apply'
,
new_user_session_path
,
class:
'btn btn-primary'
%>
<%
-
end
-
%>
<%
end
%>
</div>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-md-offset-3 "
>
<div
class=
"col-md-offset-3 "
>
<%
-
if
user_signed_in?
-
%>
<%
if
user_signed_in?
%>
<%
-
if
Apply
.
where
(
user:
current_user
,
job:
@job
).
blank?
-
%>
<%
if
Apply
.
where
(
user:
current_user
,
job:
@job
).
blank?
%>
<%=
link_to
'Apply'
,
jobs_apply_path
(
job_id:
@job
.
id
),
class:
'btn btn-primary'
%>
<%=
link_to
'Apply'
,
jobs_apply_path
(
job_id:
@job
.
id
),
class:
'btn btn-primary'
%>
<%
-
else
-
%>
<%
else
%>
<%=
link_to
'Applied'
,
'#'
,
class:
'btn btn-primary'
%>
<%=
link_to
'Applied'
,
'#'
,
class:
'btn btn-primary'
%>
<%
-
end
-
%>
<%
end
%>
<%
-
else
-
%>
<%
else
%>
<%=
link_to
'Apply'
,
new_user_session_path
,
class:
'btn btn-primary'
%>
<%=
link_to
'Apply'
,
new_user_session_path
,
class:
'btn btn-primary'
%>
<%
-
end
-
%>
<%
end
%>
<%
-
if
user_signed_in?
-
%>
<%
if
user_signed_in?
%>
<%
-
if
Favorite
.
where
(
user:
current_user
,
job:
@job
).
blank?
-
%>
<%
if
Favorite
.
where
(
user:
current_user
,
job:
@job
).
blank?
%>
<%=
link_to
'Favorite'
,
'#'
,
class:
'favorite_add btn btn-primary'
%>
<%=
link_to
'Favorite'
,
'#'
,
class:
'favorite_add btn btn-primary'
%>
<%
-
else
-
%>
<%
else
%>
<%=
link_to
'Favorite'
,
'#'
,
class:
'favorite_add btn btn-primary'
,
disabled:
true
%>
<%=
link_to
'Favorite'
,
'#'
,
class:
'favorite_add btn btn-primary'
,
disabled:
true
%>
<%
-
end
-
%>
<%
end
%>
<%
-
else
-
%>
<%
else
%>
<%=
link_to
'Favorite'
,
new_user_session_path
,
class:
'btn btn-primary'
%>
<%=
link_to
'Favorite'
,
new_user_session_path
,
class:
'btn btn-primary'
%>
<%
-
end
-
%>
<%
end
%>
<input
type=
"hidden"
id=
"job_id"
name=
"job_id"
value=
"
<%=
@job
.
id
%>
"
>
<input
type=
"hidden"
id=
"job_id"
name=
"job_id"
value=
"
<%=
@job
.
id
%>
"
>
</div>
</div>
</div>
</div>
...
...
app/views/layouts/_header.html.erb
View file @
45cb0dd9
...
@@ -3,18 +3,17 @@
...
@@ -3,18 +3,17 @@
<%=
link_to
image_tag
(
'http://images.careerbuilder.vn/background/ok_cb_vipbn_vtlc_1440x430_1496992170.jpg'
,
width:
'100px'
),
root_path
,
id:
'logo'
%>
<%=
link_to
image_tag
(
'http://images.careerbuilder.vn/background/ok_cb_vipbn_vtlc_1440x430_1496992170.jpg'
,
width:
'100px'
),
root_path
,
id:
'logo'
%>
<nav>
<nav>
<ul
class=
"nav navbar-nav navbar-right"
>
<ul
class=
"nav navbar-nav navbar-right"
>
<%
-
if
user_signed_in?
-
%>
<%
if
user_signed_in?
%>
<li>
<%=
link_to
'My profile'
,
registrations_show_path
%>
</li>
<li>
<%=
link_to
'My profile'
,
registrations_show_path
%>
</li>
<li>
<%=
link_to
'Log out'
,
destroy_user_session_path
,
method: :delete
%>
</li>
<li>
<%=
link_to
'Log out'
,
destroy_user_session_path
,
method: :delete
%>
</li>
<li>
<%=
link_to
'Favorite'
,
jobs_favorited_jobs_path
%>
</li>
<li>
<%=
link_to
'Favorite'
,
jobs_favorited_jobs_path
%>
</li>
<li>
<%=
link_to
'History'
,
jobs_history_jobs_path
%>
</li>
<li>
<%=
link_to
'History'
,
jobs_history_jobs_path
%>
</li>
<%
-
else
-
%>
<%
else
%>
<li>
<%=
link_to
'Login'
,
new_user_session_path
%>
</li>
<li>
<%=
link_to
'Login'
,
new_user_session_path
%>
</li>
<li>
<%=
link_to
'Register'
,
new_user_registration_path
%>
</li>
<li>
<%=
link_to
'Register'
,
new_user_registration_path
%>
</li>
<li>
<%=
link_to
'Favorite'
,
new_user_session_path
%>
</li>
<li>
<%=
link_to
'Favorite'
,
new_user_session_path
%>
</li>
<li>
<%=
link_to
'History'
,
new_user_session_path
%>
</li>
<li>
<%=
link_to
'History'
,
new_user_session_path
%>
</li>
<%-
end
-%>
<%
end
%>
</ul>
</ul>
</nav>
</nav>
</div>
</div>
...
...
app/views/sessions/new.html.erb
View file @
45cb0dd9
<%
-
provide
(
:title
,
'Login'
)
-
%>
<%
provide
(
:title
,
'Login'
)
%>
<div
class=
"well"
>
<div
class=
"well"
>
<h2>
Log in
</h2>
<h2>
Log in
</h2>
<%=
form_for
(
:session
,
url:
login_path
)
do
|
f
|
%>
<%=
form_for
(
:session
,
url:
login_path
)
do
|
f
|
%>
...
@@ -29,5 +29,5 @@
...
@@ -29,5 +29,5 @@
<%=
link_to
'Register'
,
register_path
,
class:
'btn btn-primary'
%>
<%=
link_to
'Register'
,
register_path
,
class:
'btn btn-primary'
%>
</div>
</div>
</div>
</div>
<%
-
end
-
%>
<%
end
%>
</div>
</div>
app/views/static_pages/home.html.erb
View file @
45cb0dd9
<%
-
provide
(
:title
,
'Home'
)
-
%>
<%
provide
(
:title
,
'Home'
)
%>
<div
class=
"well"
>
<div
class=
"well"
>
<div
class=
"banner"
>
<div
class=
"banner"
>
<%=
image_tag
(
'http://images.careerbuilder.vn/background/ok_cb_vipbn_vtlc_1440x430_1496992170.jpg'
,
width:
'100%'
)
%>
<%=
image_tag
(
'http://images.careerbuilder.vn/background/ok_cb_vipbn_vtlc_1440x430_1496992170.jpg'
,
width:
'100%'
)
%>
...
@@ -23,14 +23,14 @@
...
@@ -23,14 +23,14 @@
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
<%
-
@latest_jobs
.
each
do
|
job
|
-
%>
<%
@latest_jobs
.
each
do
|
job
|
%>
<tr>
<tr>
<td>
<%=
job
.
name
%>
</td>
<td>
<%=
job
.
name
%>
</td>
<td>
<%=
job
.
salary
%>
</td>
<td>
<%=
job
.
salary
%>
</td>
<td>
<%=
job
.
city
.
try
(
:name
)
%>
</td>
<td>
<%=
job
.
city
.
try
(
:name
)
%>
</td>
<td>
<%=
truncate
(
job
.
description
,
length:
250
)
%>
</td>
<td>
<%=
truncate
(
job
.
description
,
length:
250
)
%>
</td>
</tr>
</tr>
<%
-
end
-
%>
<%
end
%>
</tbody>
</tbody>
</table>
</table>
</div>
</div>
...
@@ -39,12 +39,12 @@
...
@@ -39,12 +39,12 @@
<h3>
Top cities
<%=
link_to
'All cities'
,
cities_path
%>
</h3>
<h3>
Top cities
<%=
link_to
'All cities'
,
cities_path
%>
</h3>
<div
class=
"top_cities"
>
<div
class=
"top_cities"
>
<div
class=
"row"
>
<div
class=
"row"
>
<%
-
@top_cities
.
each
do
|
city
|
-
%>
<%
@top_cities
.
each
do
|
city
|
%>
<div
class=
"col-md-4"
>
<div
class=
"col-md-4"
>
<%=
city
.
name
%>
<%=
city
.
name
%>
(
<%=
pluralize
(
city
.
job
.
count
,
'job'
)
%>
)
(
<%=
pluralize
(
city
.
job
.
count
,
'job'
)
%>
)
</div>
</div>
<%
-
end
-
%>
<%
end
%>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -52,12 +52,12 @@
...
@@ -52,12 +52,12 @@
<h3>
Top industries
<%=
link_to
'All industries'
,
categories_path
-%>
</h3>
<h3>
Top industries
<%=
link_to
'All industries'
,
categories_path
-%>
</h3>
<div
class=
"top_industries"
>
<div
class=
"top_industries"
>
<div
class=
"row"
>
<div
class=
"row"
>
<%
-
@top_categories
.
each
do
|
category
|
-
%>
<%
@top_categories
.
each
do
|
category
|
%>
<div
class=
"col-md-4"
>
<div
class=
"col-md-4"
>
<%=
category
.
name
%>
<%=
category
.
name
%>
(
<%=
pluralize
(
category
.
job_category
.
count
,
'job'
)
%>
)
(
<%=
pluralize
(
category
.
job_category
.
count
,
'job'
)
%>
)
</div>
</div>
<%
-
end
-
%>
<%
end
%>
</div>
</div>
</div>
</div>
</div>
</div>
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