codecombat/app/templates/account/profile.jade
2014-04-09 13:14:52 -07:00

153 lines
5.5 KiB
Text

extends /templates/base
block content
if myProfile || (me.isAdmin() && user.get('jobProfile'))
.profile-control-bar
if myProfile
a(href="/account/settings")
button.btn.edit-settings-button
i.icon-cog
span(data-i18n="account_profile.edit_settings") Edit Settings
if me.isAdmin() && user.get('jobProfile')
button.btn.edit-settings-button#toggle-job-profile-approved
i.icon-cog
span(data-i18n='account_profile.approved').approved Approved
span(data-i18n='account_profile.approved').not-approved Not Approved
if user.get('jobProfile')
- var profile = user.get('jobProfile');
.job-profile-container
.job-profile-row
.left-column.full-height-column
.profile-photo-container
img.profile-photo(src=photoURL)
.profile-caption= profile.jobTitle || 'Software Developer'
if profileLinks.length
ul.links
each link in profileLinks
li(title=profile.name + " on " + link.name, class=link.icon ? "has-icon" : "")
a(href=link.link)
if link.icon
img(src=link.icon.url, alt=link.icon.name)
else
button.btn.btn-large.btn-inverse.flat-button= link.name
div= profile.city + ', ' + profile.country
div= profile.visa
div Looking for: #{profile.lookingFor}
div Last updated #{moment(profile.updated).fromNow()}
button#contact-candidate.btn.btn-large.btn-inverse.flat-button Contact #{profile.name.split(' ')[0]}
.middle-column.full-height-column
h3= profile.name
p= profile.shortDescription
each skill in profile.skills
code= skill
span
div.long-description!= marked(profile.longDescription)
if profile.work.length
h3
img.header-icon(src="/images/pages/account/profile/work.png", alt="")
| Work Experience
each job in profile.work
div.duration.pull-right= job.duration
| #{job.role} at #{job.employer}
.clearfix
if profile.education.length
h3
img.header-icon(src="/images/pages/account/profile/education.png", alt="")
| Education
each school in profile.education
div.duration.pull-right= school.duration
| #{school.degree} at #{school.school}
.clearfix
if user.get('jobProfileNotes') || me.isAdmin()
h3 Our Notes
- var notes = user.get('jobProfileNotes') || '';
if me.isAdmin()
textarea#job-profile-notes!= notes
else
p!= marked(notes)
.right-column.full-height-column
if profile.projects.length
h3 Projects
ul.projects
each project in profile.projects
li
a(href=project.link)
.project-image(style="background-image: url(/file/" + project.picture + ")")
p= project.name
p!= marked(project.description)
a(href=project.link).btn.btn-large.btn-inverse.flat-button Check it out
else
h2
if grav && grav.name && grav.name.formatted
span(data-i18n="account_profile.profile_for_prefix") Profile for
span= grav.name.formatted
span(data-i18n="account_profile.profile_for_suffix")
else
span(data-i18n="account_profile.profile") Profile
if loadingProfile
p(data-i18n="common.loading") Loading...
else if !user.get('emailHash')
p(data-i18n="account_profile.user_not_found") No user found. Check the URL?
else if !user.gravatarProfile
if myProfile
p
span(data-i18n="account_profile.gravatar_not_found_mine") We couldn't find your profile associated with:
strong "#{me.get('email')}"
span(data-i18n="account_profile.gravatar_not_found_email_suffix") .
span
span(data-i18n="account_profile.gravatar_signup_prefix") Sign up at
a(href="http://en.gravatar.com/") Gravatar
span(data-i18n="account_profile.gravatar_signup_suffix") to get set up!
else
p(data-i18n="account_profile.gravatar_not_found_other")
| Alas, there's no profile associated with this person's email address.
else
.container
div.row
div.col-xs-3
img(src=photoURL).img-thumbnail
p.about-me #{grav.aboutMe}
if grav.emails
div.col-xs-3
h3(data-i18n="account_profile.gravatar_contact") Contact
ul
each email in grav.emails
li #{email.value}
if grav.urls && grav.urls.length
div.col-xs-3
h3(data-i18n="account_profile.gravatar_websites") Websites
ul
each url in grav.urls
li
a(href="#{url.value}") #{url.title}
if grav.accounts
div.col-xs-3
h3(data-i18n="account_profile.gravatar_accounts") As Seen On
ul
each account in grav.accounts
li
a(href="#{account.url}") #{account.domain}
hr
p
a(href="#{grav.profileUrl}", data-i18n="account_profile.gravatar_profile_link") Full Gravatar Profile