Skip to content

Commit

Permalink
use the new content blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
orangewolf committed Sep 21, 2023
1 parent f78eb75 commit 29873b1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 131 deletions.
131 changes: 0 additions & 131 deletions app/controllers/hyrax/homepage_controller.rb

This file was deleted.

20 changes: 20 additions & 0 deletions app/controllers/hyrax/homepage_controller_decorator.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# frozen_string_literal: true

# OVERRIDE Hyrax 3.5 to add content blocks
module Hyrax
module HomepageControllerDecorator

def index
@presenter = presenter_class.new(current_ability, collections)
@featured_researcher = ContentBlock.for(:researcher)
@marketing_text = ContentBlock.for(:marketing)
@featured_work_list = FeaturedWorkList.new
@announcement_text = ContentBlock.for(:announcement)
@homepage_about_section_heading = ContentBlock.for(:homepage_about_section_heading)
@homepage_about_section_content = ContentBlock.for(:homepage_about_section_content)
recent
end
end
end

Hyrax::HomepageController.prepend Hyrax::HomepageControllerDecorator

0 comments on commit 29873b1

Please sign in to comment.