annotate app/views/tweets/_tweet.html.erb @ 64:a20bbd1e2dc1

Now with avatar and proper retweet styling and stuff
author nanaya <me@myconan.net>
date Tue, 01 Dec 2015 01:24:34 +0900
parents 9ab79a764434
children eecb35eac2f3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
64
a20bbd1e2dc1 Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents: 62
diff changeset
1 <% if tweet.retweeted_status.present? %>
a20bbd1e2dc1 Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents: 62
diff changeset
2 <p>
a20bbd1e2dc1 Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents: 62
diff changeset
3 <em>Retweeted:</em>
a20bbd1e2dc1 Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents: 62
diff changeset
4 </p>
62
9ab79a764434 Sweet tweet media viewer (image only for now)
nanaya <me@myconan.net>
parents:
diff changeset
5
64
a20bbd1e2dc1 Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents: 62
diff changeset
6 <%= render "tweet", :tweet => tweet.retweeted_status %>
a20bbd1e2dc1 Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents: 62
diff changeset
7 <% else%>
a20bbd1e2dc1 Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents: 62
diff changeset
8 <p>
a20bbd1e2dc1 Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents: 62
diff changeset
9 <%= link_to "https://twitter.com/#{tweet.user.screen_name}" do %>
a20bbd1e2dc1 Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents: 62
diff changeset
10 <%= image_tag tweet.user.profile_image_url_https %>
a20bbd1e2dc1 Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents: 62
diff changeset
11 <%= tweet.user.name -%>
a20bbd1e2dc1 Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents: 62
diff changeset
12 <% end %>
a20bbd1e2dc1 Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents: 62
diff changeset
13
a20bbd1e2dc1 Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents: 62
diff changeset
14 /
a20bbd1e2dc1 Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents: 62
diff changeset
15
a20bbd1e2dc1 Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents: 62
diff changeset
16 <%= auto_link(tweet.text).html_safe %>
a20bbd1e2dc1 Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents: 62
diff changeset
17 </p>
a20bbd1e2dc1 Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents: 62
diff changeset
18
a20bbd1e2dc1 Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents: 62
diff changeset
19 <p>
a20bbd1e2dc1 Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents: 62
diff changeset
20 <% tweet.media.each do |media| %>
a20bbd1e2dc1 Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents: 62
diff changeset
21 <% if media.is_a? Twitter::Media::Photo %>
a20bbd1e2dc1 Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents: 62
diff changeset
22 <%= link_to "#{media.media_url_https}:orig" do %>
a20bbd1e2dc1 Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents: 62
diff changeset
23 <%= image_tag "#{media.media_url_https}:small" -%>
a20bbd1e2dc1 Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents: 62
diff changeset
24 <% end %>
62
9ab79a764434 Sweet tweet media viewer (image only for now)
nanaya <me@myconan.net>
parents:
diff changeset
25 <% end %>
9ab79a764434 Sweet tweet media viewer (image only for now)
nanaya <me@myconan.net>
parents:
diff changeset
26 <% end %>
64
a20bbd1e2dc1 Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents: 62
diff changeset
27 </p>
62
9ab79a764434 Sweet tweet media viewer (image only for now)
nanaya <me@myconan.net>
parents:
diff changeset
28
64
a20bbd1e2dc1 Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents: 62
diff changeset
29 <% if tweet.quoted_status.present? %>
a20bbd1e2dc1 Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents: 62
diff changeset
30 <blockquote>
a20bbd1e2dc1 Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents: 62
diff changeset
31 <%= render "tweet", :tweet => tweet.quoted_status %>
a20bbd1e2dc1 Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents: 62
diff changeset
32 </blockquote>
a20bbd1e2dc1 Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents: 62
diff changeset
33 <% end %>
62
9ab79a764434 Sweet tweet media viewer (image only for now)
nanaya <me@myconan.net>
parents:
diff changeset
34 <% end %>