This repository has been archived by the owner on Jun 7, 2021. It is now read-only.
/
show.html.haml
103 lines (87 loc) · 4.42 KB
/
show.html.haml
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
- @meta = { :description => "#{@user.login}'s profile on #{configatron.community_name}.", :keywords => "#{@user.login}, #{@user.tags.join(", ") unless @user.tags.nil?}", :robots => configatron.robots_meta_show_content }
- @section = @user.eql?(current_user) ? 'my_profile' : 'users'
- @sidebar_left = true
- if @is_current_user and @user.vendor? and (@user.offerings.empty? or @user.description.nil? )
%p
? Hey, you're a
= configatron.community_name
Pro! You should
= link_to :update_your_profile.l, edit_user_path(@user)
\! Add your skills, contact info and Web site.
.yui-b
= render :partial => 'profile_user_info_sidebar', :locals => {:user => @user}
- if @user.description
-box :id => "about_me" do
%h3
=:about_me.l
%p= @user.description
-box :class => 'alt', :id => 'friends' do
%h3
=:my_friends.l
= link_to "(#{@friend_count})", accepted_user_friendships_path(@user) if @friend_count > 5
%p
= link_to "» #{:invite_a_friend.l :site => configatron.community_name}".html_safe, invite_user_path(@user) if @is_current_user
%br= link_to "» #{:view_all_my_friend_requests.l} (#{@pending_friendships_count})".html_safe, pending_user_friendships_path(@user) if @is_current_user
- @accepted_friendships.each do |user|
=render :partial => "users/sidebar_user", :locals => {:user => user}
-if @accepted_friendships.size > 4
%h6.all
=link_to :see_all.l, accepted_user_friendships_path(@user)
- unless @users_comments.empty?
-box :class => 'yui-g alt', :id => 'photo_comments' do
%h3=:my_recent_comments.l
- @users_comments.each do |comment|
%dl.vcard
%dt.photo
- if comment.recipient
= link_to image_tag(comment.recipient.avatar_photo_url(:thumb), :alt => "#{comment.recipient.login}", :width => '50', :height => '50'), commentable_url(comment)
%dd.fn
- if comment.commentable.eql?(comment.recipient)
%strong= :to.l + ": #{link_to comment.recipient.login, commentable_url(comment)}"
- else
%strong= :on_commentable.l + ": #{link_to comment.commentable_name, commentable_url(comment)} (#{comment.commentable_type.l})"
%dd
%p= "\"#{truncate_words( comment.comment, 10, '...')}\""
- unless @photo_comments.empty?
-box :class => 'yui-g alt', :id => 'photo_comments' do
%h3=:photo_comments.l
- @photo_comments.each do |comment|
%dl.vcard
%dt.photo
= link_to(image_tag(comment.commentable.photo.photo.url(:thumb), :width => '50', :height => '50'), user_photo_path(@user, comment.commentable))
%dd.fn= "#{comment.username}" + " " + :says.l + ":"
%dd
= truncate_words(comment.comment, 10)
%br
= link_to "» ".html_safe + :view_comment.l, user_photo_path(@user, comment.commentable) + "#comment_#{comment.id}"
#yui-main
.yui-b
- if @photos.empty? and @recent_posts.empty?
-box :class => "alt first_alt" do
%h3= :small_profile.l :user => @user.login
- unless @photos.empty?
-box :id => "photos" do
%h3=:my_photos.l
- @photos.each do |photo|
= link_to image_tag( photo.photo.url(:thumb), :class => "polaroid"), user_photo_path(@user, photo)
%h6.all.right= link_to :view_all_my_photos.l, user_photos_path(@user)
=link_to(:add_a_photo.l, new_user_photo_path(@user)) if @is_current_user
- unless @recent_posts.empty?
-box :id => "posts" do
%h3=:recent_blog_posts.l
= render :partial => 'posts/post', :collection => @recent_posts
%h6.right.all= link_to :view_my_blog.l, user_posts_path(@user)
- unless @clippings.empty?
-box :id => "clippings" do
%h3=:my_clippings.l
- @clippings.each do |clipping|
%a{"href"=>"#{h user_clipping_url(@user, clipping)}"}
%img.clipping.polaroid{"src"=>"#{h clipping.image_uri(:thumb)}", :width => '100', :height => '100'}
%h6.all.right= link_to :view_all_my_clippings.l, user_clippings_path(@user)
-box :class => 'hfeed comments', :id => 'comments' do
%h3=:profile_comments.l
%h2=:add_your_comment.l
= render :partial => 'comments/comment_form', :locals => {:commentable => @user}
%a#newest_comment
= render :partial => 'comments/comment', :collection => @comments
%span#more_comments_links= more_user_comments_links