-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closes AgileVentures/MetPlus_tracker#520 #498
Changes from 3 commits
529b4e4
47e3a2f
f17420c
6c7386e
5155273
a9d78f1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,25 @@ | |
// You can use Sass (SCSS) here: http://sass-lang.com/ | ||
.has-error { | ||
color: red; | ||
} | ||
|
||
.edit-profile-btn { | ||
background-color: #0c7ba1; | ||
border-radius: 8px; | ||
color: #fff; | ||
font-weight: bold; | ||
height: 50px; | ||
padding: 12px 16px; | ||
width: 250px; | ||
margin-top: 20px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line should be indented 2 spaces, but was indented 4 spaces |
||
&:hover { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rule declaration should be preceded by an empty line |
||
color: #fff; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Color literals like |
||
} | ||
} | ||
|
||
.my-profile-header { | ||
font-size: 48px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line should be indented with spaces, not tabs |
||
color: #0c7ba1; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line should be indented with spaces, not tabs |
||
font-weight: 700; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line should be indented with spaces, not tabs There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line should be indented with spaces, not tabs |
||
padding-bottom: 20px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line should be indented with spaces, not tabs |
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,6 +96,7 @@ def update | |
end | ||
|
||
def home | ||
logger.info("Person: #{pets_user.inspect}") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks like a holdover from development(?) |
||
@jobseeker = JobSeeker.find(params[:id]) | ||
@recent_jobs_type = 'recent-jobs' | ||
authorize @jobseeker | ||
|
@@ -165,6 +166,12 @@ def download_resume | |
end | ||
end | ||
|
||
def my_profile | ||
@jobseeker = JobSeeker.find(params[:id]) | ||
authorize @jobseeker | ||
@current_resume = @jobseeker.resumes[0] | ||
end | ||
|
||
private | ||
|
||
def address_is_empty?(jobseeker_params) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,4 +43,8 @@ def edit_profile? | |
update_profile? | ||
end | ||
|
||
def my_profile? | ||
user.is_agency_person? record.agency | ||
end | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Extra empty line detected at class body end. |
||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,11 @@ def home? | |
def update_profile? | ||
user.is_company_person? record.company and user == record | ||
end | ||
|
||
def my_profile? | ||
(agency_admin? user and agency_related_to_company?(user.agency, record.company)) or | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use && instead of and. |
||
user.is_company_person? record.company | ||
end | ||
|
||
def edit_profile? | ||
update_profile? | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,10 @@ def edit? | |
update? | ||
end | ||
|
||
def my_profile? | ||
user == record | ||
end | ||
|
||
def home? | ||
# account owner | ||
user == record | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
.row | ||
.col-md-4 | ||
%h1.my-profile-header Your Profile | ||
%table.table | ||
%tbody | ||
%tr | ||
%td | ||
%strong Full Name | ||
%td= @agency_person.first_name + ' ' + @agency_person.last_name | ||
%tr | ||
%td | ||
%strong Email | ||
%td= @agency_person.email | ||
%tr | ||
%td | ||
%strong Phone | ||
%td= @agency_person.phone | ||
= link_to "Edit", edit_profile_agency_person_path(@agency_person), class: "btn btn-lg edit-profile-btn" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line is too long. [107/90] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
.row | ||
.col-md-4 | ||
%h1.my-profile-header Your Profile | ||
%table.table | ||
%tbody | ||
%tr | ||
%td | ||
%strong Title | ||
%td= @company_person.title | ||
%tr | ||
%td | ||
%strong Full Name | ||
%td= @company_person.first_name + ' ' + @company_person.last_name | ||
%tr | ||
%td | ||
%strong Email | ||
%td= @company_person.email | ||
%tr | ||
%td | ||
%strong Phone | ||
%td= @company_person.phone | ||
= link_to "Edit", edit_profile_company_person_path(@company_person), class: "btn btn-lg edit-profile-btn" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line is too long. [109/90] There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line is too long. [109/90] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
%div{class:'row'} | ||
%div{class:'col-sm-8 col-sm-offset-2'} | ||
%h1 Edit JobSeeker Registration | ||
%h1 Update Your Profile | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line contains tabs in indentation |
||
%br | ||
= render partial: 'form' | ||
%br |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
.row | ||
.col-md-8 | ||
%h1.my-profile-header Your Profile | ||
%table.table | ||
%tbody | ||
%tr | ||
%td | ||
%strong Full Name | ||
%td= @jobseeker.first_name + ' ' + @jobseeker.last_name | ||
%tr | ||
%td | ||
%strong Email | ||
%td= @jobseeker.email | ||
%tr | ||
%td | ||
%strong Phone | ||
%td= @jobseeker.phone | ||
%tr | ||
%td | ||
%strong Year Of Birth | ||
%td= @jobseeker.year_of_birth | ||
%tr | ||
%td | ||
%strong Resume | ||
%td | ||
- if @current_resume | ||
Your current resume is #{@current_resume.file_name} and was uploaded on | ||
%span.utc_to_local_time= @current_resume.updated_at | ||
- else | ||
You have no current resume | ||
= link_to "Edit", edit_job_seeker_path(@jobseeker), class: "btn btn-lg edit-profile-btn" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line is too long. [92/90] There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We're missing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line is too long. [92/90] There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line is too long. [92/90] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,11 +45,11 @@ | |
%ul.dropdown-menu{ 'aria-labelledby' => 'dd_menu' } | ||
%li | ||
- if current_user.actable_type == 'JobSeeker' | ||
= link_to 'Edit Profile', edit_job_seeker_path(current_user.actable_id) | ||
= link_to 'My Profile', my_profile_job_seeker_path(current_user.actable_id) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line is too long. [95/90] |
||
- elsif current_user.actable_type == 'CompanyPerson' | ||
= link_to 'Edit Profile', edit_profile_company_person_path(current_user.actable_id) | ||
= link_to 'My Profile', my_profile_company_person_path(current_user.actable_id) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line is too long. [99/90] |
||
- elsif current_user.actable_type == 'AgencyPerson' | ||
= link_to 'Edit Profile', edit_profile_agency_person_path(current_user.actable_id) | ||
= link_to 'My Profile', my_profile_agency_person_path(current_user.actable_id) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line is too long. [98/90] |
||
- else | ||
= link_to 'Edit Profile', edit_user_registration_path(current_user) | ||
%li | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line should be indented 2 spaces, but was indented 4 spaces