Skip to content

Commit

Permalink
Merge pull request #5 from scientist-softserv/get_it_loading
Browse files Browse the repository at this point in the history
Get it loading
  • Loading branch information
orangewolf authored Sep 23, 2023
2 parents b9ef88a + 2370f5a commit fe7f50f
Show file tree
Hide file tree
Showing 17 changed files with 205 additions and 221 deletions.
31 changes: 27 additions & 4 deletions app/forms/hyrax/forms/admin/appearance_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,39 @@ module Hyrax
module Forms
module Admin
module AppearanceDecorator
DEFAULT_COLORS = {
'header_and_footer_background_color' => '#3c3c3c',
'header_and_footer_text_color' => '#dcdcdc',
'navbar_background_color' => '#000000',
'navbar_link_background_hover_color' => '#ffffff',
'navbar_link_text_color' => '#eeeeee',
'navbar_link_text_hover_color' => '#eeeeee',
'link_color' => '#2e74b2',
'link_hover_color' => '#215480',
'footer_link_color' => '#ffebcd',
'footer_link_hover_color' => '#ffffff',
'primary_button_hover_color' => '#286090',
'default_button_background_color' => '#ffffff',
'default_button_border_color' => '#cccccc',
'default_button_text_color' => '#333333',
# 'active_tabs_background_color' => '#337ab7',
'facet_panel_background_color' => '#f5f5f5',
'facet_panel_text_color' => '#333333',
'custom_adl_header_footer_color' => '#CE8C00'
}.freeze


# TODO do we need this adl_header_footer_color?
# 'custom_adl_header_footer_color' => '#CE8C00'
# OVERRIDE here to add adventist's custom header & footer
# def custom_adl_header_footer_color
# block_for('custom_adl_header_footer_color')
#end

def custom_adl_header_footer_color
block_for('custom_adl_header_footer_color')
end
end
end
end
end

Hyrax::Forms::Admin::Appearance.prepend Hyrax::Forms::Admin::AppearanceDecorator

Hyrax::Forms::Admin::Appearance.customization_params << :custom_adl_header_footer_color
4 changes: 2 additions & 2 deletions app/forms/hyrax/forms/collection_form_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ module Forms
module CollectionFormDecorator
# Terms that appear within the accordion
def secondary_terms
(super + Collection::ADDITIONAL_TERMS).sort
(super + Collection.additional_terms).sort
end
end
end
end

Hyrax::Forms::CollectionForm.terms += Collection::ADDITIONAL_TERMS
Hyrax::Forms::CollectionForm.terms += Collection.additional_terms
Hyrax::Forms::CollectionForm.prepend(Hyrax::Forms::CollectionFormDecorator)
1 change: 0 additions & 1 deletion app/models/.#content_block_decorator.rb

This file was deleted.

50 changes: 26 additions & 24 deletions app/models/collection_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,32 @@
include SlugMetadata
include AdventistMetadata

ADDITIONAL_TERMS = %i[abstract
alt
date
date_accepted
date_available
date_issued
date_published
date_submitted
department
doi
former_identifier
funder
issue_number
lat
location
long
managing_organisation
note
official_url
output_of
pagination
part_of
place_of_publication
publication_status].freeze
def self.additional_terms
%i[abstract
alt
date
date_accepted
date_available
date_issued
date_published
date_submitted
department
doi
former_identifier
funder
issue_number
lat
location
long
managing_organisation
note
official_url
output_of
pagination
part_of
place_of_publication
publication_status].freeze
end

include DogBiscuits::JournalArticleMetadata
include DogBiscuits::BibliographicCitation
Expand Down
16 changes: 13 additions & 3 deletions app/models/content_block_decorator.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
# frozen_string_literal: true

module ContentBlockDecorator
NAME_REGISTRY = {
marketing: :marketing_text,
researcher: :featured_researcher,
announcement: :announcement_text,
about: :about_page,
help: :help_page,
terms: :terms_page,
agreement: :agreement_page,
home_text: :home_text,
resources: :resources_page,
homepage_about_section_heading: :homepage_about_section_heading,
homepage_about_section_content: :homepage_about_section_content
}.freeze
end

ContentBlock::NAME_REGISTRY[:resources] = :resources_page
ContentBlock::NAME_REGISTRY[:homepage_about_section_heading] = :homepage_about_section_heading
ContentBlock::NAME_REGISTRY[:homepage_about_section_content] = :homepage_about_section_content
ContentBlock.prepend(ContentBlockDecorator)
14 changes: 14 additions & 0 deletions app/models/file_set_decorator.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module FileSetDecorator
extend ActiveSupport::Concern

included do
property :override_default_thumbnail,
predicate: ::RDF::URI.intern('https://b2.adventistdigitallibrary.org/terms/overrideDefaultThumbnail'),
multiple: false do |index|
index.as :stored_searchable
end
attr_accessor :default_thumbnail
end
end

FileSet.include FileSetDecorator
16 changes: 0 additions & 16 deletions app/models/hyrax/file_set_decorator.rb

This file was deleted.

4 changes: 2 additions & 2 deletions app/presenters/hyrax/collection_presenter_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
module Hyrax
module CollectionPresenterDecorator
module ClassMethods
delegate(*Collection::ADDITIONAL_TERMS, to: :solr_document)
delegate(*Collection.additional_terms, to: :solr_document)

# Terms is the list of fields displayed by
# app/views/collections/_show_descriptions.html.erb
def terms
super + Collection::ADDITIONAL_TERMS
super + Collection.additional_terms
end
end
end
Expand Down
Loading

0 comments on commit fe7f50f

Please sign in to comment.