From e9c87f7f448eff38e987e39c84488b210c3da838 Mon Sep 17 00:00:00 2001 From: Pistos Date: Tue, 4 Oct 2011 01:30:08 -0400 Subject: [PATCH] Always show "Reshare original" for link. Show number of reshares in the post_initial_info div. This is to improve UX by making it much more obvious how to reshare a post that has already been reshared. Prior to this change, the link to reshare would show only the reshare count, e.g. "7 reshares". Most users would have no idea that they need to click "7 reshares" to reshare the post themselves. --- app/helpers/reshares_helper.rb | 3 +-- app/views/shared/_stream_element.html.haml | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/helpers/reshares_helper.rb b/app/helpers/reshares_helper.rb index f5131814f..ffa9b84e1 100644 --- a/app/helpers/reshares_helper.rb +++ b/app/helpers/reshares_helper.rb @@ -25,8 +25,7 @@ module ResharesHelper :remote => true, :confirm => t('reshares.reshare.reshare_confirmation', :author => post.root.author.name) else - link_to t("reshares.reshare.reshare", - :count => post.reshares.size), + link_to t("reshares.reshare.reshare_original"), reshares_path(:root_guid => post.guid), :method => :post, :remote => true, diff --git a/app/views/shared/_stream_element.html.haml b/app/views/shared/_stream_element.html.haml index db6e7468a..25047bb6d 100644 --- a/app/views/shared/_stream_element.html.haml +++ b/app/views/shared/_stream_element.html.haml @@ -32,6 +32,10 @@ – %span.timeago = link_to(how_long_ago(post), post_path(post)) + - if post.reshares.any? + – + %span.num_reshares + = t("reshares.reshare.reshare", :count => post.reshares.size) - if post.activity_streams? = link_to image_tag(post.image_url, 'data-small-photo' => post.image_url, 'data-full-photo' => post.image_url, :class => 'stream-photo'), post.object_url, :class => "stream-photo-link"