From a88293ab571c8855130c6e4d509f2080932b72e9 Mon Sep 17 00:00:00 2001 From: Leena Gupte Date: Mon, 20 Jan 2025 18:03:10 +0000 Subject: [PATCH] WIP - show_protection_type_image? --- app/presenters/specialist_document_presenter.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/presenters/specialist_document_presenter.rb b/app/presenters/specialist_document_presenter.rb index 9a4fd475b7..15cd994885 100644 --- a/app/presenters/specialist_document_presenter.rb +++ b/app/presenters/specialist_document_presenter.rb @@ -3,6 +3,10 @@ def show_contents_list? content_item.headers.present? && level_two_headings? end + def show_protection_type_image? + protected_food_drink_name? && content_item.protection_type_image.present? + end + def show_finder_link? content_item.finder.present? && statutory_instrument? end @@ -13,6 +17,10 @@ def level_two_headings? content_item.headers.any? { |header| header[:level] == 2 } end + def protected_food_drink_name? + content_item.document_type == "protected_food_drink_name" + end + def statutory_instrument? content_item.document_type == "statutory_instrument" end