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

51 lines
1.8 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
.row
2013-08-23 18:15:42 +01:00
.span3.profile
.avatar= image_tag avatar_url(user || group, :big), :alt => (user || group).uname
.base_info
%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-08-26 10:54:47 +01:00
= link_to image_tag('gears.png'), edit_url if can?(:edit, user)
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
= 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
= link_to short_message(user.site, max_length - message.length), user.site, :title => user.site
2013-08-23 18:15:42 +01:00
%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
%h3{:style => 'margin-top: 0;'}= desc_title
= desc
2013-08-23 18:15:42 +01:00
%hr.profile_line{:color => 'dfe8ef', :size => '3'}
2013-08-22 14:55:44 +01:00
.content
%h4= t("layout.projects.public_projects_list") + ":"
%p
=form_tag search_path, :id => 'filter_projects', :method => :get do
=tracker_search_field(:search, t('layout.find_project'))
%br
%p
- projects.each do |project|
= link_to project.name, project
%br
%br
= will_paginate projects
%br