-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'content_block_updates' into adventist_dev
- Loading branch information
Showing
5 changed files
with
80 additions
and
175 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
app/controllers/hyrax/content_blocks_controller_decorator.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# frozen_string_literal: true | ||
|
||
# OVERRIDE Hyrax v3.4.0 to add home_text to permitted_params - Adding themes | ||
module Hyrax | ||
module ContentBlocksControllerDecorator | ||
# override hyrax v2.9.0 added the home_text content block to permitted_params - Adding Themes | ||
def permitted_params | ||
params.require(:content_block).permit(:marketing, | ||
:announcement, | ||
:home_text, | ||
:homepage_about_section_heading, | ||
:homepage_about_section_content, | ||
:researcher) | ||
end | ||
end | ||
end | ||
|
||
Hyrax::ContentBlocksController.prepend Hyrax::ContentBlocksControllerDecorator |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters