mirror of
https://github.com/diaspora/diaspora.git
synced 2026-04-29 03:01:03 -04:00
made image or default to help with hcard parsing, deleted old default user picture
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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 |
Reference in New Issue
Block a user