diff --git a/app/views/moderation/questions/show.html.haml b/app/views/moderation/questions/show.html.haml index 8f174ba0..48617bf2 100644 --- a/app/views/moderation/questions/show.html.haml +++ b/app/views/moderation/questions/show.html.haml @@ -5,4 +5,4 @@ .container-lg.container--main - @questions.each do |q| - = render 'shared/question', q: q, type: nil + = render "shared/question", q:, type: "moderation" diff --git a/app/views/shared/_question.html.haml b/app/views/shared/_question.html.haml index 354f8a6b..a5094207 100644 --- a/app/views/shared/_question.html.haml +++ b/app/views/shared/_question.html.haml @@ -1,8 +1,17 @@ - type ||= nil .card.questionbox{ data: { id: q.id } } + - if type.nil? && q.direct + - if user_signed_in? && q.user == current_user + .card-header + %i.fa.fa-eye-slash + Only you can see this + - elsif moderation_view? + .card-header + %i.fa.fa-eye-slash + You can see this because you are in moderation view .card-body{ data: { controller: q.long? ? "collapse" : nil } } .d-flex - - if type == 'discover' + - if type == "discover" .flex-shrink-0 %a{ href: user_screen_name(q.user, link_only: true) } %img.avatar-md.me-2{ src: q.user&.profile_picture&.url(:small), loading: :lazy } @@ -13,7 +22,7 @@ ยท %a{ href: question_path(q.user.screen_name, q.id) } = pluralize(q.answer_count, t("voc.answer")) - .answerbox__question-text{ class: q.long? ? 'collapsed' : '', data: { collapse_target: "content" } } + .answerbox__question-text{ class: q.long? ? "collapsed" : "", data: { collapse_target: "content" } } = question_markdown q.content - if q.long? = render "shared/collapse", type: "question"