Skip to content

Commit

Permalink
WIP - show_protection_type_image?
Browse files Browse the repository at this point in the history
  • Loading branch information
leenagupte committed Jan 20, 2025
1 parent df0e093 commit a88293a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/presenters/specialist_document_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit a88293a

Please sign in to comment.