From c59a70844b16917bde753e2b3e356966e62edf50 Mon Sep 17 00:00:00 2001 From: Karina Kwiatek Date: Fri, 15 Jul 2022 16:19:40 +0200 Subject: [PATCH] Display if a context question has been deleted when viewing anon blocks --- app/views/settings/blocks/index.haml | 5 ++++- config/locales/views.en.yml | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/views/settings/blocks/index.haml b/app/views/settings/blocks/index.haml index 895f44ee..9aa5af62 100644 --- a/app/views/settings/blocks/index.haml +++ b/app/views/settings/blocks/index.haml @@ -25,7 +25,10 @@ %li.list-group-item .d-flex %div - %p.mb-0= block.question.content + - if block.question.present? + %p.mb-0= block.question.content + - else + %p.mb-0.text-muted.font-italic= t('.deleted_question') %p.text-muted.mb-0= t(".blocked", time: time_ago_in_words(block.created_at)) .ml-auto.d-inline-flex %button.btn.btn-default.align-self-center{ data: { action: "anon-unblock", target: block.id } } diff --git a/config/locales/views.en.yml b/config/locales/views.en.yml index 6c8973b7..204a87e9 100644 --- a/config/locales/views.en.yml +++ b/config/locales/views.en.yml @@ -156,6 +156,7 @@ en: anon_blocks: heading: "Anonymous Blocks" body: "Each anonymous user you've blocked is listed here, along with a way to unblock them. We also display the question they asked you to add some more context. You can block anonymous users directly from the question in your inbox." + deleted_question: "Deleted question" data: index: title: "Your Data"