Skip to content

Commit

Permalink
Support for #327
Browse files Browse the repository at this point in the history
  • Loading branch information
nutjob4life committed Jan 19, 2024
1 parent 1f33d19 commit 4ebee5a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/eke.knowledge/src/eke/knowledge/sites.py
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,7 @@ class SiteIndex(KnowledgeFolder):
_typeC = 'Associate Member C'
_spore = 'SPOREs'
_non = 'Non-EDRN Site'
_ahead = 'AHEAD'
template = 'eke.knowledge/site-index.html'
subpage_types = [Site, OrganizationalGroup]

Expand All @@ -683,6 +684,7 @@ def get_context(self, request: HttpRequest, *args, **kwargs) -> dict:
context['typeC'] = Site.objects.child_of(self).live().public().filter(memberType=self._typeC)
context['spore'] = Site.objects.child_of(self).live().public().filter(memberType=self._spore)
context['non'] = Site.objects.child_of(self).live().public().filter(memberType=self._non)
context['ahead'] = Site.objects.child_of(self).live().public().filter(memberType=self._ahead)

sites = Site.objects.child_of(self).live().public().specific().order_by(Lower('title'))
map_data = sites.values('title', 'pi__title', 'pi__city', 'pi__lat', 'pi__lon').exclude(pi__lat__isnull=True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<li><a href='#assoc'>Associate Members</a></li>
<li><a href='#spore'>SPOREs</a></li>
<li><a href='#nonEDRN'>Non-EDRN Sites</a></li>
<li><a href='#ahead'>Advancement of Head and Neck Cancer Early Detection Research (AHEAD)</a></li>
</ul>

<h2><a name='bccs'>Biomarker Characterization Centers</a></h2>
Expand Down Expand Up @@ -160,6 +161,13 @@ <h2><a name='nonEDRN'>Non-EDRN Sites</a></h2>
<p class='small'>There are no non-EDRN sites.</p>
{% endif %}

<h2><a name='ahead'>Advancement of Head and Neck Cancer Early Detection Research (AHEAD)</a></h2>
{% if ahead %}
{% edrn_sites_by_type ahead %}
{% else %}
<p class='small'>There are no non-AHEAD sites.</p>
{% endif %}

{% endif %}
{% endblock knowledge_content %}
{% block extra_js %}
Expand Down

0 comments on commit 4ebee5a

Please sign in to comment.