Skip to content

Commit

Permalink
Merge pull request #669 from hms-dbmi/HYP-302
Browse files Browse the repository at this point in the history
HYP 302
  • Loading branch information
b32147 authored Apr 26, 2024
2 parents 3533147 + 82d3916 commit 3773eaa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/projects/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,8 @@ class Group(models.Model):
def __str__(self):
return self.title

def active_project_child_groups(self):
return self.group_set.filter(dataproject__isnull=False, dataproject__visible=True).distinct()

################################################################################
# Deprecated models
Expand Down
2 changes: 1 addition & 1 deletion app/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">{{ group.navigation_title|default:group.title }} <span class="caret"></span></a>
<ul class="dropdown-menu" aria-labelledby="{{ group.navigation_title|default:group.title }}">
{% for child in group.group_set.all %}
{% for child in group.active_project_child_groups %}
{% url 'group' child.key as group_url %}
<li class="nav-item{% if request.path == group_url or child.key == navigation.active_group.key %} active{% endif %}"><a class="nav-link" href="{{ group_url }}">{{ child.navigation_title|default:child.title }}</a></li>
{% endfor %}
Expand Down

0 comments on commit 3773eaa

Please sign in to comment.