diff options
author | Raphael Sofaer <raphael@joindiaspora.com> | 2011-07-29 01:42:02 +0400 |
---|---|---|
committer | Raphael Sofaer <raphael@joindiaspora.com> | 2011-07-29 01:42:02 +0400 |
commit | 87d0f9d6fd1346010cacc724ee26e592f34026e7 (patch) | |
tree | 5dbdb1f77090658416676d20a08456c922c9975f /app | |
parent | b367a486d37037b5988bf823c714425db07b35a8 (diff) | |
parent | 6e25a6a0f1112256c80c7a182e7eaaf4f633fc08 (diff) |
Merge branch 'master' of github.com:diaspora/diaspora
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/reshares_helper.rb | 8 | ||||
-rw-r--r-- | app/views/reshares/_reshare.haml | 8 | ||||
-rw-r--r-- | app/views/shared/_stream_element.html.haml | 2 |
3 files changed, 13 insertions, 5 deletions
diff --git a/app/helpers/reshares_helper.rb b/app/helpers/reshares_helper.rb index 6ba1a0241..d889ce1d6 100644 --- a/app/helpers/reshares_helper.rb +++ b/app/helpers/reshares_helper.rb @@ -7,7 +7,11 @@ module ResharesHelper end end - def reshare_link post - link_to t("reshares.reshare.reshare", :count => post.reshares.size), reshares_path(:root_guid => post.guid), :method => :post, :remote => true, :confirm => t('reshares.reshare.reshare_confirmation', :author => post.author.name, :text => post.text) + def reshare_link(post) + if reshare?(post) + link_to t("reshares.reshare.reshare_original"), reshares_path(:root_guid => post.root.guid), :method => :post, :remote => true, :confirm => t('reshares.reshare.reshare_confirmation', :author => post.root.author.name) + else + link_to t("reshares.reshare.reshare", :count => post.reshares.size), reshares_path(:root_guid => post.guid), :method => :post, :remote => true, :confirm => t('reshares.reshare.reshare_confirmation', :author => post.author.name) + end end end diff --git a/app/views/reshares/_reshare.haml b/app/views/reshares/_reshare.haml index 38fe531f6..add2e59a8 100644 --- a/app/views/reshares/_reshare.haml +++ b/app/views/reshares/_reshare.haml @@ -8,10 +8,14 @@ = person_image_link(post.author, :size => :thumb_small) .content - .right - = link_to t(".show_original"), post_path(post) %span.from = person_link(post.author, :class => "hovercardable") + %span.details + – + %span.timeago + = link_to(how_long_ago(post), post_path(post)) + – + = 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" diff --git a/app/views/shared/_stream_element.html.haml b/app/views/shared/_stream_element.html.haml index 70375a2ed..cfcc37c72 100644 --- a/app/views/shared/_stream_element.html.haml +++ b/app/views/shared/_stream_element.html.haml @@ -58,7 +58,7 @@ %span.like_action = like_action(post, current_user) - - if (post.author_id != current_user.person.id) && (post.public?) && !reshare?(post) + - if (post.author_id != current_user.person.id) && (post.public?) · %span.reshare_action = reshare_link(post) |