Mercurial > rsstweet
annotate app/views/tweets/_tweet.html.erb @ 129:9348882a4f35
Update gems
author | nanaya <me@nanaya.pro> |
---|---|
date | Sun, 01 Oct 2017 03:50:55 +0900 |
parents | d4b2bd9e23f5 |
children | faae69155f90 |
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> |
128
d4b2bd9e23f5
Add original tweet date for retweets
nanaya <me@nanaya.pro>
parents:
126
diff
changeset
|
4 <br><small>Originally tweeted at <%= tweet.retweeted_status.created_at.to_s :rfc822 %></small> |
64
a20bbd1e2dc1
Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents:
62
diff
changeset
|
5 </p> |
62
9ab79a764434
Sweet tweet media viewer (image only for now)
nanaya <me@myconan.net>
parents:
diff
changeset
|
6 |
64
a20bbd1e2dc1
Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents:
62
diff
changeset
|
7 <%= render "tweet", :tweet => tweet.retweeted_status %> |
a20bbd1e2dc1
Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents:
62
diff
changeset
|
8 <% else%> |
a20bbd1e2dc1
Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents:
62
diff
changeset
|
9 <p> |
100 | 10 <%# FIXME: Twitter gem doesn't support extended mode when writing this %> |
103
1251b3d6ec5d
Use included url data instead of expanding using embiggen
nanaya <me@myconan.net>
parents:
100
diff
changeset
|
11 <%= auto_link(expand_url( |
125 | 12 tweet.attrs[:full_text].printable, |
103
1251b3d6ec5d
Use included url data instead of expanding using embiggen
nanaya <me@myconan.net>
parents:
100
diff
changeset
|
13 tweet.attrs[:entities][:urls], |
1251b3d6ec5d
Use included url data instead of expanding using embiggen
nanaya <me@myconan.net>
parents:
100
diff
changeset
|
14 tweet.attrs[:entities][:media] |
1251b3d6ec5d
Use included url data instead of expanding using embiggen
nanaya <me@myconan.net>
parents:
100
diff
changeset
|
15 )) |
1251b3d6ec5d
Use included url data instead of expanding using embiggen
nanaya <me@myconan.net>
parents:
100
diff
changeset
|
16 .gsub("\n", "<br>") |
1251b3d6ec5d
Use included url data instead of expanding using embiggen
nanaya <me@myconan.net>
parents:
100
diff
changeset
|
17 .html_safe |
1251b3d6ec5d
Use included url data instead of expanding using embiggen
nanaya <me@myconan.net>
parents:
100
diff
changeset
|
18 %> |
79 | 19 </p> |
20 | |
21 <p> | |
64
a20bbd1e2dc1
Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents:
62
diff
changeset
|
22 <%= link_to "https://twitter.com/#{tweet.user.screen_name}" do %> |
126 | 23 <%= image_tag tweet.user.profile_image_url_https, :alt => "profile image for #{tweet.user.name.printable}" %> |
125 | 24 <%= tweet.user.name.printable -%> |
64
a20bbd1e2dc1
Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents:
62
diff
changeset
|
25 <% end %> |
75
585952f98978
Put the tweet on different paragraph
nanaya <me@myconan.net>
parents:
65
diff
changeset
|
26 </p> |
64
a20bbd1e2dc1
Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents:
62
diff
changeset
|
27 |
75
585952f98978
Put the tweet on different paragraph
nanaya <me@myconan.net>
parents:
65
diff
changeset
|
28 <p> |
126 | 29 <% tweet.media.each_with_index do |media, i| %> |
64
a20bbd1e2dc1
Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents:
62
diff
changeset
|
30 <% 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
|
31 <%= link_to "#{media.media_url_https}:orig" do %> |
126 | 32 <%= image_tag "#{media.media_url_https}:small", :alt => "attachment #{i + 1}" -%> |
64
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 %> |
9ab79a764434
Sweet tweet media viewer (image only for now)
nanaya <me@myconan.net>
parents:
diff
changeset
|
35 <% end %> |
64
a20bbd1e2dc1
Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents:
62
diff
changeset
|
36 </p> |
62
9ab79a764434
Sweet tweet media viewer (image only for now)
nanaya <me@myconan.net>
parents:
diff
changeset
|
37 |
64
a20bbd1e2dc1
Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents:
62
diff
changeset
|
38 <% if tweet.quoted_status.present? %> |
a20bbd1e2dc1
Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents:
62
diff
changeset
|
39 <blockquote> |
a20bbd1e2dc1
Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents:
62
diff
changeset
|
40 <%= render "tweet", :tweet => tweet.quoted_status %> |
a20bbd1e2dc1
Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents:
62
diff
changeset
|
41 </blockquote> |
a20bbd1e2dc1
Now with avatar and proper retweet styling and stuff
nanaya <me@myconan.net>
parents:
62
diff
changeset
|
42 <% end %> |
62
9ab79a764434
Sweet tweet media viewer (image only for now)
nanaya <me@myconan.net>
parents:
diff
changeset
|
43 <% end %> |