Implement moderation question view layout

This commit is contained in:
Andreas Nedbal 2022-08-21 04:05:42 +02:00 committed by Andreas Nedbal
parent 778cf90f85
commit f521b5f160
5 changed files with 23 additions and 0 deletions

View File

@ -19,6 +19,9 @@
%i.fa.fa-exclamation-triangle
= t("voc.report")
- if current_user.mod? && a.question.anonymous? && !a.question.generated?
%a.dropdown-item{ href: moderation_questions_path(author_identifier: a.question.author_identifier) }
%i.fa.fa-user-secret
= t("voc.show_anonymous_questions")
%a.dropdown-item{ href: "#", name: "mod-block-anon", data: { q_id: a.question.id } }
%i.fa.fa-volume-off
= t("voc.block_site_wide")

View File

@ -0,0 +1,6 @@
.card.question--fixed{ class: hidden ? 'question--hidden' : '', tabindex: hidden ? -1 : '', aria: { hidden: hidden } }
.container
.card-body
.media
.media-body
= t(".title_html", author_identifier: author_identifier, short: author_identifier.truncate(32))

View File

@ -0,0 +1,8 @@
- provide(:title, generate_title(t(".title", author_identifier: params[:author_identifier].truncate(32))))
= render "header", author_identifier: params[:author_identifier], hidden: false
= render "header", author_identifier: params[:author_identifier], hidden: true
.container-lg.container--main
- @questions.each do |q|
= render 'shared/question', q: q, type: nil

View File

@ -578,6 +578,11 @@ en:
index:
title: "Site-wide anonymous blocks"
empty: "There are currently no users blocked site-wide."
questions:
header:
title_html: "Viewing all questions from <br><abbr title=%{author_identifier}>%{short}</abbr>"
index:
title: "Questions from %{author_identifier}"
user:
actions:
view_inbox: "View inbox"

View File

@ -13,6 +13,7 @@ en:
login: "Sign in"
logout: "Sign out"
save: "Save changes"
show_anonymous_questions: "Show all questions from this user"
register: "Sign up"
report: "Report"
terms: "Terms of Service"