Skip to content

Commit

Permalink
Merge staging for release
Browse files Browse the repository at this point in the history
  • Loading branch information
jvendetti committed Sep 22, 2020
2 parents 8e88400 + fedb79d commit 9f90233
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/controllers/ontologies_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,15 @@ def show
# Note: find_by_acronym includes ontology views
@ontology = LinkedData::Client::Models::Ontology.find_by_acronym(params[:ontology]).first
not_found if @ontology.nil?

# Handle the case where an ontology is converted to summary only.
# See: https://github.com/ncbo/bioportal_web_ui/issues/133.
if @ontology.summaryOnly && params[:p].present?
pages = KNOWN_PAGES - ["summary", "notes"]
if pages.include?(params[:p])
redirect_to(ontology_path(params[:ontology]), status: :temporary_redirect) and return
end
end

# Retrieve submissions in descending submissionId order (should be reverse chronological order)
@submissions = @ontology.explore.submissions.sort {|a,b| b.submissionId.to_i <=> a.submissionId.to_i } || []
Expand Down

0 comments on commit 9f90233

Please sign in to comment.