diaspora/app/helpers/report_helper.rb
Lukas Matt 6bf47c7ff0 Fix spec files and report model
* Adopt pronto suggestions
2015-10-03 17:17:45 +02:00

19 lines
568 B
Ruby

# Copyright (c) 2012, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
module ReportHelper
def report_content(report)
case (item = report.item)
when Post
raw t("report.post_label", title: link_to(post_page_title(item), post_path(item.id)))
when Comment
raw t("report.comment_label", data: link_to(
h(comment_message(item)),
post_path(item.post.id, anchor: item.author.guid)
))
else
raw t("report.not_found")
end
end
end