Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: bug of display list submitted ontologies of account setting #286

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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|
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This solution is not good.

The goal is not to show the views of the submitted ontologies.

But to show all the submitted ontologies and views of the users (currently only the ontologies are listed)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SirineMhedhbi remove this code and open a new PR

.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