changeset 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
files app/views/tweets/_tweet.html.erb
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/app/views/tweets/_tweet.html.erb	Sun Oct 01 03:55:01 2017 +0900
+++ b/app/views/tweets/_tweet.html.erb	Sun Oct 01 04:04:35 2017 +0900
@@ -1,11 +1,16 @@
 <% if tweet.retweeted_status.present? %>
   <p>
     <em>Retweeted:</em>
-    <br><small>(Originally tweeted at <%= tweet.retweeted_status.created_at.to_s :rfc822 %>)</small>
   </p>
 
-  <%= render "tweet", :tweet => tweet.retweeted_status %>
+  <%= render "tweet", :tweet => tweet.retweeted_status, :with_time => true %>
 <% else%>
+  <% if defined? :with_time && with_time %>
+    <p>
+      <small>Originally tweeted at <%= tweet.created_at.to_s :rfc822 %></small>
+    </p>
+  <% end %>
+
   <p>
     <%# FIXME: Twitter gem doesn't support extended mode when writing this %>
     <%= auto_link(expand_url(
@@ -37,7 +42,7 @@
 
   <% if tweet.quoted_status.present? %>
     <blockquote>
-      <%= render "tweet", :tweet => tweet.quoted_status %>
+      <%= render "tweet", :tweet => tweet.quoted_status, :with_time => true %>
     </blockquote>
   <% end %>
 <% end %>