forked from diaspora/diaspora
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
With undecided / reviewed and statistics page Already reviewed reports stay visible Enhances Spam/user control fixes diaspora#8239
- Loading branch information
Showing
15 changed files
with
395 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
%table.table | ||
%tr | ||
%th | ||
= t("report.created_at") | ||
%th | ||
= t("report.reported_by") | ||
%th | ||
= t("report.reason") | ||
%th | ||
= t("report.type") | ||
%th | ||
= t("report.author") | ||
%th | ||
= t("report.decision") | ||
%th | ||
= t("report.action") | ||
- @reviewed_reports.each do |report| | ||
%tr | ||
%td | ||
= I18n.l(report.created_at, format: :short) | ||
%td | ||
= link_to(report.user.username, user_profile_path(report.user.username)) | ||
%td | ||
= report.text | ||
%td | ||
= report.item_type | ||
%td | ||
- unless report.originator_diaspora_handle.nil? | ||
= link_to(report.originator_diaspora_handle, "/people/#{report.originator_guid}") | ||
%td | ||
= t("report.item_deleted") if report.action_deleted? | ||
= t("report.item_no_action") if report.action_no_action? | ||
%td | ||
- unless report.item.nil? | ||
= link_to_content(report) | ||
= link_to(report_path(report.id, type: report.item_type), | ||
data: {confirm: t("report.confirm_deletion")}, | ||
title: t("report.delete_link"), | ||
class: "delete", method: :delete) do | ||
%i.entypo-trash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
- @unreviewed_reports.each do |report| | ||
- if report.item | ||
.panel.panel-default | ||
- username = report.user.username | ||
.panel-heading | ||
.reporter.pull-right | ||
!= t("report.reported_label", person: link_to(username, user_profile_path(username))) | ||
.author | ||
%span.reason-label | ||
!= "#{t('report.author')}:" | ||
%span | ||
= report.author.name | ||
.created-at | ||
%span.reason-label | ||
!= "#{t('report.created_at')}:" | ||
%span | ||
= I18n.l(report.created_at, format: :short) | ||
.reason | ||
%span.reason-label | ||
= t("report.reason_label") | ||
%span | ||
= report.text | ||
.panel-body | ||
.content | ||
= report_content(report) | ||
.segment-selection | ||
= button_to t("report.reported_user_details"), | ||
user_search_path(admins_controller_user_search: {guid: report.reported_author.guid}), | ||
class: "btn pull-left btn-info btn-small col-md-3 col-xs-12", method: :post | ||
= button_to t("report.review_link"), report_path(report.id, type: report.item_type), | ||
class: "btn pull-left btn-info btn-small col-md-3 col-xs-12", method: :put | ||
= button_to t("report.delete_link"), report_path(report.id, type: report.item_type), | ||
data: {confirm: t("report.confirm_deletion")}, | ||
class: "btn pull-right btn-danger btn-small col-md-3 col-xs-12", method: :delete | ||
- else | ||
.panel.panel-default | ||
- username = report.user.username | ||
.panel-heading | ||
.reporter.pull-right | ||
!= t("report.reported_label", person: link_to(username, user_profile_path(username))) | ||
.title | ||
= report_content(report) | ||
.panel-body | ||
= button_to t("report.review_link"), report_path(report.id, type: report.item_type), | ||
class: "btn pull-left btn-info btn-small", method: :put | ||
- if @unreviewed_reports.empty? | ||
%h3 | ||
= t("report.no_pending_reports") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,26 @@ | ||
|
||
- content_for :head do | ||
= stylesheet_link_tag :admin | ||
|
||
.reports | ||
%h1 | ||
= t("report.title") | ||
- if @reports.empty? | ||
%p | ||
= t("report.unreviewed_reports", count: 0) | ||
- @reports.each do |report| | ||
- if report.item | ||
.panel.panel-default | ||
- username = report.user.username | ||
.panel-heading | ||
.reporter.pull-right | ||
!= t("report.reported_label", person: link_to(username, user_profile_path(username))) | ||
.reason | ||
%span.reason-label | ||
= t("report.reason_label") | ||
%span | ||
= report.text | ||
.panel-body | ||
.content | ||
= report_content(report) | ||
.segment-selection | ||
= button_to t("report.reported_user_details"), | ||
user_search_path(admins_controller_user_search: {guid: report.reported_author.guid}), | ||
class: "btn pull-left btn-info btn-small col-md-3 col-xs-12", method: :post | ||
= button_to t("report.review_link"), report_path(report.id, type: report.item_type), | ||
class: "btn pull-left btn-info btn-small col-md-3 col-xs-12", method: :put | ||
= button_to t("report.delete_link"), report_path(report.id, type: report.item_type), | ||
data: {confirm: t("report.confirm_deletion")}, | ||
class: "btn pull-right btn-danger btn-small col-md-3 col-xs-12", method: :delete | ||
- else | ||
.panel.panel-default | ||
- username = report.user.username | ||
.panel-heading | ||
.reporter.pull-right | ||
!= t("report.reported_label", person: link_to(username, user_profile_path(username))) | ||
.title | ||
= report_content(report) | ||
.panel-body | ||
= button_to t("report.review_link"), report_path(report.id, type: report.item_type), | ||
class: "btn pull-left btn-info btn-small", method: :put | ||
%ul.nav.nav-tabs{role: "tablist"} | ||
%li.nav-item.active{role: "presentation"} | ||
%a{href: "#reports", title: t("report.tooltip_incomming"), | ||
aria: {controls: "reports", selected: true}, data: {toggle: "tab"}} | ||
= t("report.reported_tab") | ||
%li.nav-item{role: "presentation"} | ||
%a{href: "#checked", title: t("report.tooltip_reviewed"), | ||
aria: {controls: "checked", selected: false}, data: {toggle: "tab"}} | ||
= t("report.reviewed_tab") | ||
%li.nav-item{role: "presentation"} | ||
%a{href: "#statistics", title: t("report.tooltip_statistics"), | ||
aria: {controls: "statistics", selected: false}, data: {toggle: "tab"}} | ||
= t("report.statistics_tab") | ||
.tab-content | ||
.tab-pane.active#reports{role: "tabpanel"} | ||
= render partial: "report/pending" | ||
.tab-pane#checked{role: "tabpanel"} | ||
= render partial: "report/checked" | ||
.tab-pane#statistics{role: "tabpanel"} | ||
= render partial: "report/statistics" |
Oops, something went wrong.