Skip to content

Commit

Permalink
Merge branch 'master' into chore/switch-to-puma
Browse files Browse the repository at this point in the history
  • Loading branch information
alexskr committed Feb 14, 2025
2 parents b1979e5 + cf8c7b5 commit cd56990
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
10 changes: 10 additions & 0 deletions app/controllers/ontologies_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,16 @@ def show
# Get the latest submission (not necessarily the latest 'ready' submission)
@submission_latest = @ontology.explore.latest_submission rescue @ontology.explore.latest_submission(include: "")

# show summary only for ontologies without any submissions in ready state
unless helpers.submission_ready?(@submission_latest)
submissions = @ontology.explore.submissions(include: 'submissionId,submissionStatus')
if submissions.any?{|x| helpers.submission_ready?(x)}
@old_submission_ready = true
elsif !params[:p].blank?
params[:p] = "summary"
end
end

# Is the ontology downloadable?
restrict_downloads = $NOT_DOWNLOADABLE
@ont_restricted = restrict_downloads.include? @ontology.acronym
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/multi_languages_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def display_in_multiple_languages(label, show_max: 10, style_as_badge: false, sh
Array(value).map do |v|
content_tag(:div, class: 'definition') do
concat content_tag(:span, v)
concat content_tag(:span, key.downcase, class: 'badge bg-secondary m-1') unless key.to_s.upcase.eql?('NONE') || key.to_s.upcase.eql?('@NONE')
concat content_tag(:span, key.downcase, class: 'badge bg-secondary ms-1') unless key.to_s.upcase.eql?('NONE') || key.to_s.upcase.eql?('@NONE')
end
end.join
end.join)
Expand Down
4 changes: 2 additions & 2 deletions app/views/concepts/_details.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@

- c.add_sections(['definition']) do |v|
%div.d-flex.justify-content-between.align-items-center
%div.d-flex.flex-column
%div= display_in_multiple_languages(v)
%div.d-flex.flex-column.w-100
%div= display_in_multiple_languages(v.is_a?(Array) ? [v].to_h : v)
%div
%div.w-100{'data-controller': 'change-requests', turbo_frame: '_top'}
%div{id: 'editDefinitionFormDiv', 'data-change-requests-target': 'proposalForm'}
Expand Down

0 comments on commit cd56990

Please sign in to comment.