Merge pull request #1774 from consul/user-activity

User activity
This commit is contained in:
BertoCQ
2017-08-03 14:02:02 +02:00
committed by GitHub
3 changed files with 8 additions and 9 deletions

View File

@@ -16,9 +16,8 @@ module UsersHelper
if commentable.nil?
deleted_commentable_text(comment)
elsif commentable.hidden?
"<abbr title='#{deleted_commentable_text(comment)}'>".html_safe +
commentable.title +
"</abbr>".html_safe
content_tag(:del, commentable.title) + ' ' +
content_tag(:span, '(' + deleted_commentable_text(comment) + ')', class: 'small')
else
link_to(commentable.title, comment)
end

View File

@@ -649,8 +649,8 @@ es:
show:
deleted: Eliminado
deleted_debate: Este debate ha sido eliminado
deleted_proposal: Este propuesta ha sido eliminada
deleted_budget_investment: Este propuesta de inversión ha sido eliminada
deleted_proposal: Esta propuesta ha sido eliminada
deleted_budget_investment: Esta propuesta de inversión ha sido eliminada
filters:
comments:
one: 1 Comentario

View File

@@ -17,7 +17,7 @@ describe UsersHelper do
debate.hide
expect(comment_commentable_title(comment)).to eq "<abbr title='This debate has been deleted'>#{comment.commentable.title}</abbr>"
expect(comment_commentable_title(comment)).to eq '<del>' + comment.commentable.title + '</del> <span class="small">(This debate has been deleted)</span>'
end
it "should return the appropriate message for deleted proposals" do
@@ -26,7 +26,7 @@ describe UsersHelper do
proposal.hide
expect(comment_commentable_title(comment)).to eq "<abbr title='This proposal has been deleted'>#{comment.commentable.title}</abbr>"
expect(comment_commentable_title(comment)).to eq '<del>' + comment.commentable.title + '</del> <span class="small">(This proposal has been deleted)</span>'
end
it "should return the appropriate message for deleted budget investment" do
@@ -35,7 +35,7 @@ describe UsersHelper do
investment.hide
expect(comment_commentable_title(comment)).to eq "<abbr title='This investment has been deleted'>#{comment.commentable.title}</abbr>"
expect(comment_commentable_title(comment)).to eq '<del>' + comment.commentable.title + '</del> <span class="small">(This investment has been deleted)</span>'
end
end
@@ -48,7 +48,7 @@ describe UsersHelper do
it "should return a hint if the commentable has been deleted" do
comment = create(:comment)
comment.commentable.hide
expect(comment_commentable_title(comment)).to eq "<abbr title='This debate has been deleted'>#{comment.commentable.title}</abbr>"
expect(comment_commentable_title(comment)).to eq '<del>' + comment.commentable.title + '</del> <span class="small">(This debate has been deleted)</span>'
end
end