annotate app/views/tweets/_tweet.html.erb @ 62:9ab79a764434

Sweet tweet media viewer (image only for now)
author nanaya <me@myconan.net>
date Tue, 01 Dec 2015 01:08:37 +0900
parents
children a20bbd1e2dc1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
62
9ab79a764434 Sweet tweet media viewer (image only for now)
nanaya <me@myconan.net>
parents:
diff changeset
1 <%= auto_link(tweet.text).html_safe %>
9ab79a764434 Sweet tweet media viewer (image only for now)
nanaya <me@myconan.net>
parents:
diff changeset
2
9ab79a764434 Sweet tweet media viewer (image only for now)
nanaya <me@myconan.net>
parents:
diff changeset
3 <p>
9ab79a764434 Sweet tweet media viewer (image only for now)
nanaya <me@myconan.net>
parents:
diff changeset
4 <% tweet.media.each do |media| %>
9ab79a764434 Sweet tweet media viewer (image only for now)
nanaya <me@myconan.net>
parents:
diff changeset
5 <% if media.is_a? Twitter::Media::Photo %>
9ab79a764434 Sweet tweet media viewer (image only for now)
nanaya <me@myconan.net>
parents:
diff changeset
6 <%= link_to "#{media.media_url_https}:orig" do %>
9ab79a764434 Sweet tweet media viewer (image only for now)
nanaya <me@myconan.net>
parents:
diff changeset
7 <%= image_tag "#{media.media_url_https}:small" -%>
9ab79a764434 Sweet tweet media viewer (image only for now)
nanaya <me@myconan.net>
parents:
diff changeset
8 <% end %>
9ab79a764434 Sweet tweet media viewer (image only for now)
nanaya <me@myconan.net>
parents:
diff changeset
9 <% end %>
9ab79a764434 Sweet tweet media viewer (image only for now)
nanaya <me@myconan.net>
parents:
diff changeset
10 <% end %>
9ab79a764434 Sweet tweet media viewer (image only for now)
nanaya <me@myconan.net>
parents:
diff changeset
11 </p>
9ab79a764434 Sweet tweet media viewer (image only for now)
nanaya <me@myconan.net>
parents:
diff changeset
12
9ab79a764434 Sweet tweet media viewer (image only for now)
nanaya <me@myconan.net>
parents:
diff changeset
13 <% if tweet.quoted_status.present? %>
9ab79a764434 Sweet tweet media viewer (image only for now)
nanaya <me@myconan.net>
parents:
diff changeset
14 <blockquote>
9ab79a764434 Sweet tweet media viewer (image only for now)
nanaya <me@myconan.net>
parents:
diff changeset
15 <%= render "tweet", :tweet => tweet.quoted_status %>
9ab79a764434 Sweet tweet media viewer (image only for now)
nanaya <me@myconan.net>
parents:
diff changeset
16 </blockquote>
9ab79a764434 Sweet tweet media viewer (image only for now)
nanaya <me@myconan.net>
parents:
diff changeset
17 <% end %>