Skip to content

Commit

Permalink
Fix: bug of display list submitted ontologies of account setting (#286)
Browse files Browse the repository at this point in the history
* fix display list of views of ontologies in Submitted ontologies #270
  • Loading branch information
SirineMhedhbi authored Jul 7, 2023
1 parent 84ff01d commit d86eaff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/home_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def account
@user_ontologies = @user.customOntology
@user_ontologies ||= []

onts = LinkedData::Client::Models::Ontology.all
onts = LinkedData::Client::Models::Ontology.all(include_views: true);
@admin_ontologies = onts.select { |o| o.administeredBy.include? @user.id }

projects = LinkedData::Client::Models::Project.all
Expand Down
4 changes: 4 additions & 0 deletions app/views/users/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@
- @admin_ontologies.each do |ont|
.account-page-submitted-ontology{data: {controller: 'tooltip'}, title: ont.name}
%a{href: "/ontologies/#{ont.acronym}"}= ont.acronym
- unless ont.views.nil? || ont.views.empty?
- ont.views.each do |view|
.account-page-submitted-ontology{data: {controller: 'tooltip'}, title: ont.name}
%a{href: "/ontologies/#{view.match(/\/([^\/]+)$/)[1]}"}= view.match(/\/([^\/]+)$/)[1]
- unless @user_projects.nil? || @user_projects.empty?
- no_ontologies = false
.account-page-card
Expand Down

0 comments on commit d86eaff

Please sign in to comment.