Make reshares helper a little more readable
This commit is contained in:
parent
f63ba2c557
commit
0d864935cd
1 changed files with 11 additions and 2 deletions
|
|
@ -9,9 +9,18 @@ module ResharesHelper
|
|||
|
||||
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)
|
||||
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)
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue