Skip to content

Commit

Permalink
Show contents list in specialist document view
Browse files Browse the repository at this point in the history
This updates the view to use the new `show_contents_list?` method from
SpecialistDocumentPresenter.
  • Loading branch information
leenagupte committed Jan 17, 2025
1 parent d65c64f commit 5f00ccf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/controllers/specialist_document_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
class SpecialistDocumentController < ContentItemsController
include Cacheable

def show; end
def show
@specialist_document_presenter = SpecialistDocumentPresenter.new(content_item)
end
end
4 changes: 3 additions & 1 deletion app/views/specialist_document/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@
<% end %>
<% end %>

<%= render "components/contents_list_with_body", contents: @content_item.contents do %>
<% if @specialist_document_presenter.show_contents_list? %>
<%= render "components/contents_list_with_body", contents: content_item.headers do %>
<% end %>

<% if @content_item.protected_food_drink_name? %>
<img
Expand Down

0 comments on commit 5f00ccf

Please sign in to comment.