Switch reason and message

unify

rename and show full post on reports

Fix XSS issue

Unification

Style

Fix pronto

closes #7180
This commit is contained in:
SansPseudoFix 2016-11-03 14:59:12 +01:00 committed by Steffen van Bergerem
parent d0e70ccd6a
commit 0f60b9fb94
No known key found for this signature in database
GPG key ID: 315C9787D548DC6B
5 changed files with 17 additions and 9 deletions

View file

@ -5,6 +5,7 @@
* Replace fileuploader-custom with FineUploader [#7083](https://github.com/diaspora/diaspora/pull/7083) * Replace fileuploader-custom with FineUploader [#7083](https://github.com/diaspora/diaspora/pull/7083)
* Always show mobile reaction counts [#7207](https://github.com/diaspora/diaspora/pull/7207) * Always show mobile reaction counts [#7207](https://github.com/diaspora/diaspora/pull/7207)
* Refactor mobile alerts for error responses [#7227](https://github.com/diaspora/diaspora/pull/7227) * Refactor mobile alerts for error responses [#7227](https://github.com/diaspora/diaspora/pull/7227)
* Switch content and given reason in the reports overview [#7180](https://github.com/diaspora/diaspora/pull/7180)
## Bug fixes ## Bug fixes
* Fix background color of year on notifications page with dark theme [#7263](https://github.com/diaspora/diaspora/pull/7263) * Fix background color of year on notifications page with dark theme [#7263](https://github.com/diaspora/diaspora/pull/7263)

View file

@ -1,5 +1,9 @@
#reports { #reports {
.reason { .reason-label {
font-weight: bold;
}
.content {
padding-bottom: 20px; padding-bottom: 20px;
} }
form input { form input {

View file

@ -6,7 +6,7 @@ module ReportHelper
def report_content(report) def report_content(report)
case (item = report.item) case (item = report.item)
when Post when Post
raw t("report.post_label", title: link_to(post_page_title(item), post_path(item.id))) raw t("report.post_label", content: link_to(post_message(item), post_path(item.id)))
when Comment when Comment
raw t("report.comment_label", data: link_to( raw t("report.comment_label", data: link_to(
h(comment_message(item)), h(comment_message(item)),

View file

@ -17,11 +17,14 @@
.panel-heading .panel-heading
.reporter.pull-right .reporter.pull-right
= raw t("report.reported_label", person: link_to(username, user_profile_path(username))) = raw t("report.reported_label", person: link_to(username, user_profile_path(username)))
.title
= report_content(report)
.panel-body
.reason .reason
= t("report.reason_label", text: report.text) %span.reason-label
= t("report.reason_label")
%span
= report.text
.panel-body
.content
= report_content(report)
= button_to t("report.reported_user_details"), = button_to t("report.reported_user_details"),
user_search_path(admins_controller_user_search: {guid: report.reported_author.guid}), user_search_path(admins_controller_user_search: {guid: report.reported_author.guid}),

View file

@ -935,10 +935,10 @@ en:
report: report:
title: "Reports overview" title: "Reports overview"
post_label: "<b>Post</b>: %{title}" post_label: "<b>Post</b>: %{content}"
comment_label: "<b>Comment</b>:<br>%{data}" comment_label: "<b>Comment</b>: %{data}"
reported_label: "<b>Reported by</b> %{person}" reported_label: "<b>Reported by</b> %{person}"
reason_label: "Reason: %{text}" reason_label: "Reason:"
review_link: "Mark as reviewed" review_link: "Mark as reviewed"
delete_link: "Delete item" delete_link: "Delete item"
reported_user_details: "Details on reported user" reported_user_details: "Details on reported user"