Skip to content

Commit

Permalink
show Accessible Ontologies section in user account page only when the…
Browse files Browse the repository at this point in the history
… list of accessible ontologies is not empty
  • Loading branch information
Bilelkihal committed Jan 2, 2025
1 parent b5c897a commit 4ee4788
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
10 changes: 4 additions & 6 deletions app/views/users/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,10 @@
.account-page-submitted-ontology{data: {controller: 'tooltip'}, title: ont.name}
%a{href: "/ontologies/#{view.match(/\/([^\/]+)$/)[1]}"}= view.match(/\/([^\/]+)$/)[1]

.account-page-card
%h4.account-page-card-title= t('users.show.accessible_semantic_resources')
.account-page-small-cards-container
- if @accessed_ontologies.nil? || @accessed_ontologies.empty?
= t('users.show.no_accessible_resources')
- else
- unless @accessed_ontologies.nil? || @accessed_ontologies.empty?
.account-page-card
%h4.account-page-card-title= t('users.show.accessible_semantic_resources')
.account-page-small-cards-container
- @accessed_ontologies.each do |ont|
.account-page-submitted-ontology{data: {controller: 'tooltip'}, title: ont.name}
%a{href: "/ontologies/#{ont.acronym}"}= ont.acronym
Expand Down
1 change: 0 additions & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,6 @@ en:
subscribe: Subscribe
subscriptions: Subscriptions
no_uploaded_resources: You didn't upload any ontology yet
no_accessible_resources: You do not have access to other ontologies. You can only access ontologies you own.
notes: Notes
search:
no_search_class_provided: No search class provided
Expand Down
1 change: 0 additions & 1 deletion config/locales/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,6 @@ fr:
subscribe: S'abonner
subscriptions: Abonnements
no_uploaded_resources: Vous n'avez encore téléchargé aucune ontologie
no_accessible_resources: Vous n'avez pas accès aux d'autres ontologies. Vous ne pouvez accéder qu'aux ontologies dont vous êtes propriétaire.
notes: Notes

search:
Expand Down

0 comments on commit 4ee4788

Please sign in to comment.