bborn / communityengine

Adds basic social networking capabilities to your existing application, including users, blogs, photos, clippings, favorites, and more.

This URL has Read+Write access

communityengine / app / views / users / _user.html.haml
100644 30 lines (26 sloc) 1.383 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.hentry.yui-gf.row{"class"=>"#{user.vendor ? 'community_pro' : ''} #{user.featured_writer ? 'featured_writer' : ''}"}
  .vcard.author
    .yui-u.first.centered
      = link_to image_tag( user.avatar_photo_url(:thumb), :class => "polaroid" ), user_path(user)
    .yui-g
      .yui-u.first
        %h2= link_to user.login, user_path(user)
      
        %ul
          - if user.metro_area
            %li.geo= "from".l + " #{user.location}<br/>"
          %li.update
            %abbr.published{:title=>"#{user.created_at}"}
              ="joined".l + " #{time_ago_in_words user.created_at}"
          - if user.offerings.any?
            %li.skills= user.offerings.collect{|o| link_to o.skill.name, skill_url(o.skill) }.join(', ')
          - if current_user and current_user.can_request_friendship_with(user)
            %li.addfriend= add_friend_link(user)
 
        = "<p>" + user.tags[0...6].collect{|t| link_to( t.name, tag_url(t.name), :class => "tag") if t }.join(" ") + "</p>" unless user.tags.empty?
 
      .yui-u{"style"=>"overflow:hidden"}
        - if @search && @search['description']
          = truncate_words_with_highlight user.description, @search['description']
        - else
          = truncate_words user.description, 18, '...'
 
        - if current_user && current_user.admin?
          %br
          = link_to( "Assume ID".l, assume_user_path(user) )