made image or default to help with hcard parsing, deleted old default user picture
This commit is contained in:
parent
5af3d5fa82
commit
de04e717c0
3 changed files with 7 additions and 7 deletions
|
|
@ -57,12 +57,16 @@ module ApplicationHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def person_image_tag(person)
|
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 = person.profile.image_url
|
||||||
image_location ||= "/images/user/default.png"
|
image_location ||= "/images/user/default.png"
|
||||||
|
image_location
|
||||||
image_tag image_location, :class => "avatar", :alt => person.real_name, :title => person.real_name, "data-person_id" => person.id
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def person_image_link(person)
|
def person_image_link(person)
|
||||||
link_to person_image_tag(person), object_path(person)
|
link_to person_image_tag(person), object_path(person)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -36,13 +36,9 @@
|
||||||
<dl class="entity_photo">
|
<dl class="entity_photo">
|
||||||
<dt>Photo</dt>
|
<dt>Photo</dt>
|
||||||
<dd>
|
<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>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="entity_note">
|
|
||||||
<dt>Note</dt>
|
|
||||||
<dd class="note">Diaspora is awesome! vi is better than emacs!</dd>
|
|
||||||
</dl>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 7.2 KiB |
Loading…
Reference in a new issue