made image or default to help with hcard parsing, deleted old default user picture

This commit is contained in:
maxwell 2010-10-22 16:57:01 -07:00
parent 5af3d5fa82
commit de04e717c0
3 changed files with 7 additions and 7 deletions

View file

@ -57,11 +57,15 @@ module ApplicationHelper
end
def person_image_tag(person)
image_tag image_or_default(person), :class => "avatar", :alt => person.real_name, :title => person.real_name, "data-person_id" => person.id
end
def image_or_default(person)
image_location = person.profile.image_url
image_location ||= "/images/user/default.png"
image_tag image_location, :class => "avatar", :alt => person.real_name, :title => person.real_name, "data-person_id" => person.id
image_location
end
def person_image_link(person)
link_to person_image_tag(person), object_path(person)

View file

@ -36,13 +36,9 @@
<dl class="entity_photo">
<dt>Photo</dt>
<dd>
<img class="photo avatar" src="<%= @person.profile.image_url%>" width="100" height="100"/>
<img class="photo avatar" src="<%= image_or_default(@person)%>" width="100" height="100"/>
</dd>
</dl>
<dl class="entity_note">
<dt>Note</dt>
<dd class="note">Diaspora is awesome! vi is better than emacs!</dd>
</dl>
</div>
</div>
</div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB