aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRhenium <rhenium@rhe.jp>2014-01-31 06:43:47 +0900
committerRhenium <rhenium@rhe.jp>2014-01-31 06:43:47 +0900
commit4f26286cdc4e03496f4985f4232e68c3c8d3b8c9 (patch)
tree28d3e1ffcf7018f0e74dbc0f1271df020674b493
parent91161859855d4edb52b8e64a9381688127c537e0 (diff)
downloadaclog-4f26286cdc4e03496f4985f4232e68c3c8d3b8c9.tar.gz
improve tweet views: click fav/rts count to show full; move import link
-rw-r--r--app/views/tweets/_tweet.html.haml13
-rw-r--r--app/views/tweets/show.html.haml3
2 files changed, 8 insertions, 8 deletions
diff --git a/app/views/tweets/_tweet.html.haml b/app/views/tweets/_tweet.html.haml
index 90a74ad..875c9b8 100644
--- a/app/views/tweets/_tweet.html.haml
+++ b/app/views/tweets/_tweet.html.haml
@@ -15,7 +15,7 @@
.meta.clearfix
%span.twitter_bird= image_tag("bird_gray_16.png", alt: "Twitter")
%span.created_at
- %time{datetime: tweet.tweeted_at.to_datetime.rfc3339}
+ %time{datetime: tweet.tweeted_at.to_datetime.rfc3339}= tweet.tweeted_at
%span.source via -
.stats
%dl
@@ -49,11 +49,7 @@
= link_to image_tag("bird_gray_16.png", alt: "Twitter"), tweet.twitter_url, target: "_blank"
%span.created_at
= link_to tweet_path(tweet.id) do
- %time{datetime: tweet.tweeted_at.to_datetime.rfc3339}
- - if favorites_truncated?(tweet)
- %span.show-full= link_to "show full", tweet_path(tweet.id, full: true)
- - if logged_in?
- %span.import= link_to "import", import_path(tweet.id)
+ %time{datetime: tweet.tweeted_at.to_datetime.rfc3339}= tweet.tweeted_at
%span.source
via
= link_to_source_text(tweet.source)
@@ -62,8 +58,9 @@
- [["favs", tweet.favorites_count, tweet.favoriters], ["retweets", tweet.retweets_count, tweet.retweeters]].each do |title, count, users|
- if count > 0
%dt
- %span.count= count
- %span.type= title
+ = link_to tweet_path(tweet.id, full: true) do
+ %span.count= count
+ %span.type= title
%dd
%ul.list-inline
- users.limit(favorites_truncate_count).each do |m|
diff --git a/app/views/tweets/show.html.haml b/app/views/tweets/show.html.haml
index bd7dc10..b1184cb 100644
--- a/app/views/tweets/show.html.haml
+++ b/app/views/tweets/show.html.haml
@@ -2,3 +2,6 @@
- caption @user.screen_name + "'s Tweet"
- sidebar :users
= render @tweet
+- if logged_in?
+ .pull-right
+ %span.import= link_to "update", import_path(@tweet.id)