corrected template views; status message now includes oembed; updated post.rb api to supply oembed and object_url

This commit is contained in:
danielgrippi 2011-12-12 10:29:03 -08:00 committed by Dennis Collinson
parent e6d4ec2dc8
commit 414fb8d454
4 changed files with 37 additions and 5 deletions

View file

@ -24,7 +24,9 @@ class Post < ActiveRecord::Base
t.add :author
t.add :post_type
t.add :image_url
t.add :object_url
t.add :root
t.add :o_embed_cache
end
xml_attr :provider_display_name

View file

@ -1 +1,3 @@
<img src="<%= image_url %>" />
<a href="<%= object_url %>" class="stream-photo-link">
<img src="<%= image_url %>" data-small-photo="<%= image_url %>" data-full-photo="<%= image_url %>" class="stream-photo" />
</a>

View file

@ -1,4 +1,28 @@
<p>
<h2>this is a reshare</h2>
<%= root.text %>
</p>
<div class="reshare">
<a href="/people/<%= root.author.id %>">
<img src="<%= root.author.avatar.small %>" class="avatar" data-person-id="<%= root.author.id %>"/>
</a>
<div class="content">
<div class="post_initial_info">
<span class="from">
<a href="/people/<%= root.author.id %>">
<%= root.author.name %>
</a>
</span>
<span class="details">
-
<a href="/posts/<%= root.id %>">
<time class="timeago" datetime="<%= root.created_at %>"/>
</a>
</span>
</div>
<!-- duplicate from statusmessage partial -->
<p>
<%= root.text %>
</p>
</div>
</div>

View file

@ -1,3 +1,7 @@
<p>
<%= text %>
</p>
<% if(o_embed_cache) { %>
<%= o_embed_cache.posts.data.html %>
<% } %>