person sidebar has a view all; displays user images with names in tooltips instead of text

This commit is contained in:
danielvincent 2010-07-24 10:24:43 -07:00
parent 9095a06738
commit 03e06cb279
6 changed files with 19 additions and 20 deletions

View file

@ -45,7 +45,15 @@ module ApplicationHelper
image_location = person.profile.image_url
image_location ||= "/images/user/default.jpg"
image_tag image_location, :class => "person_picture"
image_tag image_location, :class => "person_picture", :alt => person.real_name, :title => person.real_name
end
def person_image_link(person)
link_to person_image_tag(person), object_path(person)
end
def owner_image_link
person_image_link(User.owner)
end
def new_request(request_count)

View file

@ -53,7 +53,7 @@
.span-18.append-3.last
= yield
.span-3.last
= link_to person_image_tag(User.owner), root_path
= link_to (image_tag(current_user.profile.image_url)), root_path
= link_to "Edit your profile", edit_user_path(current_user)
%br
%br

View file

@ -1,15 +1,16 @@
%ul#friend_stream.nav
%h4 friends!
%h3 friends
- for friend in @friends
%li= link_to friend.real_name, person_path(friend)
%li= person_image_link(friend)
= link_to "all", people_path
%hr
%h4 on other networks!
%h3 following
- for author in @subscribed_persons
%li= link_to author.username, author_path(author)
%li= link_to "add a new person", new_request_path
= link_to "add a new person", new_request_path

View file

@ -1,6 +1,6 @@
%li.message{:id => post.id, :class => ("mine" if mine?(post))}
= person_image_tag(post.person)
= person_image_link(post.person)
%span.from
= link_to post.person.real_name, post.person

View file

@ -196,15 +196,10 @@ ul.comment_set {
padding-bottom: 8px; }
img.person_picture {
max-width: 100%;
border-radius: 3px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
display: inline block; }
li.message > img.person_picture,
li.comment > img.person_picture,
#session_action > img.person_picture {
display: inline block;
height: 30px;
display: absolute;
float: left;

View file

@ -236,15 +236,10 @@ ul.comment_set
:bottom 8px
img.person_picture
:max-width 100%
:border-radius 3px
:-webkit-border-radius 3px
:-moz-border-radius 3px
:display inline block
li.message > img.person_picture,
li.comment > img.person_picture,
#session_action > img.person_picture
:height 30px
:display absolute
:float left
@ -416,4 +411,4 @@ ul#publisher_content_pickers li
.field_with_submit
input[type='text']
:width 85%
:display inline
:display inline