comparison app/views/tweets/_tweet.html.erb @ 131:4b5568b4a533

Also add time for quotes
author nanaya <me@nanaya.pro>
date Sun, 01 Oct 2017 04:04:35 +0900
parents faae69155f90
children bedb7e2e16ed
comparison
equal deleted inserted replaced
130:faae69155f90 131:4b5568b4a533
1 <% if tweet.retweeted_status.present? %> 1 <% if tweet.retweeted_status.present? %>
2 <p> 2 <p>
3 <em>Retweeted:</em> 3 <em>Retweeted:</em>
4 <br><small>(Originally tweeted at <%= tweet.retweeted_status.created_at.to_s :rfc822 %>)</small>
5 </p> 4 </p>
6 5
7 <%= render "tweet", :tweet => tweet.retweeted_status %> 6 <%= render "tweet", :tweet => tweet.retweeted_status, :with_time => true %>
8 <% else%> 7 <% else%>
8 <% if defined? :with_time && with_time %>
9 <p>
10 <small>Originally tweeted at <%= tweet.created_at.to_s :rfc822 %></small>
11 </p>
12 <% end %>
13
9 <p> 14 <p>
10 <%# FIXME: Twitter gem doesn't support extended mode when writing this %> 15 <%# FIXME: Twitter gem doesn't support extended mode when writing this %>
11 <%= auto_link(expand_url( 16 <%= auto_link(expand_url(
12 tweet.attrs[:full_text].printable, 17 tweet.attrs[:full_text].printable,
13 tweet.attrs[:entities][:urls], 18 tweet.attrs[:entities][:urls],
35 <% end %> 40 <% end %>
36 </p> 41 </p>
37 42
38 <% if tweet.quoted_status.present? %> 43 <% if tweet.quoted_status.present? %>
39 <blockquote> 44 <blockquote>
40 <%= render "tweet", :tweet => tweet.quoted_status %> 45 <%= render "tweet", :tweet => tweet.quoted_status, :with_time => true %>
41 </blockquote> 46 </blockquote>
42 <% end %> 47 <% end %>
43 <% end %> 48 <% end %>