rosa-build/app/views/shared/_profile.html.haml

55 lines
2.0 KiB
Plaintext
Raw Normal View History

2013-08-22 14:55:44 +01:00
- edit_url ||= nil
- user ||= nil
- group ||= nil
- name ||= uname
2013-08-22 14:55:44 +01:00
- desc, desc_title = if user
- [user.professional_experience, t('activerecord.attributes.user.professional_experience')]
- else
- [group.description , t('activerecord.attributes.group.description')]
- max_length = 35
2013-09-10 18:03:00 +01:00
= hidden_field_tag :profile_path, @profile_path
2013-08-22 14:55:44 +01:00
.row
2013-08-23 18:15:42 +01:00
.span3.profile
2014-01-21 04:51:49 +00:00
.avatar= image_tag avatar_url(user || group, :big), alt: (user || group).uname
2013-08-23 18:15:42 +01:00
.base_info
2014-01-21 04:51:49 +00:00
%h3{title: uname}= title short_message(uname, 16)
%p{title: user.try(:name)}
2013-08-22 14:55:44 +01:00
- if user
= short_message(user.name, 28)
2013-09-13 14:55:01 +01:00
= link_to image_tag('gears.png'), edit_url if edit_url.present?
2013-08-22 14:55:44 +01:00
.both
- if user
2013-08-23 18:15:42 +01:00
%p.info.first
2013-08-22 14:55:44 +01:00
- message = "#{t 'activerecord.attributes.user.email'}: "
= message
2014-01-21 04:51:49 +00:00
= mail_to user.email, short_message(user.email, max_length - message.length), encode: 'javascript', title: user.email
2013-08-23 18:15:42 +01:00
%p.info
2013-08-22 14:55:44 +01:00
- message = "#{t 'activerecord.attributes.user.site'}: "
= message
2014-01-21 04:51:49 +00:00
= link_to short_message(user.site, max_length - message.length), user.site, title: user.site
%p.info{title: user.company}= short_message("#{t 'activerecord.attributes.user.company'}: #{user.company}", max_length)
%p.info{title: user.location}= short_message("#{t 'activerecord.attributes.user.location'}: #{user.location}", max_length)
2013-08-22 14:55:44 +01:00
.span6
2014-01-21 04:51:49 +00:00
%h3{style: 'margin-top: 0;'}= desc_title
2013-08-22 14:55:44 +01:00
= desc
2014-01-21 04:51:49 +00:00
%hr.profile_line{color: 'dfe8ef', size: '3'}
2013-08-22 14:55:44 +01:00
2013-09-08 12:56:43 +01:00
.row-fluid.profile-content
.span12.content
%nav
%ul
%li
2014-01-21 04:51:49 +00:00
= link_to t('layout.projects.list_header'), '#', class: 'projects active'
2013-09-08 12:56:43 +01:00
.span12.sub-menu
%nav
%ul
2014-01-21 04:51:49 +00:00
%li= link_to t('layout.projects.public'), '#', class: "public-projects #{!@hidden ? 'active' : ''}"
%li= link_to t('layout.projects.private'), '#', class: "private-projects #{@hidden ? 'active' : ''}"
2013-09-08 12:56:43 +01:00
.search
.pic
2014-01-21 04:51:49 +00:00
.field= text_field_tag :query_projects, @query, placeholder: t('layout.find_project')
2013-09-10 18:03:00 +01:00
.both
2014-01-21 04:51:49 +00:00
.profile-table= render 'shared/profile_projects', projects: projects