Skip to content

Commit

Permalink
[i777] - collection metadata clean up
Browse files Browse the repository at this point in the history
- updates styling to make labels bold in the collection form
- updates locale helper method to account for collection resources

Issue:
- scientist-softserv/adventist_knapsack#777
  • Loading branch information
ShanaLMoore committed Sep 18, 2024
1 parent d261207 commit 6ed6aa3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions app/assets/stylesheets/hyrax.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,8 @@
background: #ffff00;
font-weight: 700;
}

// to make collection form labels bold
#collection-edit-controls label.control-label {
font-weight: bold;
}
4 changes: 2 additions & 2 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ def hint_for(term:, record_class: nil)
def locale_for(type:, term:, record_class:)
term = term.to_s
record_class = record_class.to_s.downcase
work_or_collection = record_class == 'collection' ? 'collection' : 'defaults'
work_or_collection = record_class == Hyrax.config.collection_model.downcase ? 'collection' : 'defaults'
locale = t("hyrax.#{record_class}.#{type}.#{term}")

if missing_translation(locale)
(t("simple_form.#{type}.#{work_or_collection}.#{term}") || term.titleize) .html_safe
(t("simple_form.#{type}.#{work_or_collection}.#{term}")).try(:html_safe)
else
locale.html_safe
end
Expand Down

0 comments on commit 6ed6aa3

Please sign in to comment.