Skip to content

Commit

Permalink
Fix various missing template variables
Browse files Browse the repository at this point in the history
  • Loading branch information
danlamanna committed Jan 23, 2025
1 parent 395a6df commit 1182b97
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
6 changes: 3 additions & 3 deletions isic/core/templates/core/image_detail/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@
{% include 'core/image_detail/metadata_tab.html' %}
{% include 'core/image_detail/studies_tab.html' %}

{% if sections.patient_images %}
{% if 'patient_images' in sections %}
{% include 'core/image_detail/images_tab.html' with images=other_patient_images images_count=other_patient_images_count section_name='patient_images' %}
{% endif %}

{% if sections.lesion_images %}
{% if 'lesion_images' in sections %}
{% include 'core/image_detail/images_tab.html' with images=other_lesion_images images_count=other_lesion_images_count section_name='lesion_images' %}
{% endif %}

{% if sections.ingestion_details %}
{% if 'ingestion_details' in sections %}
{% include 'core/image_detail/ingestion_details_tab.html' %}
{% endif %}
</div>
Expand Down
6 changes: 1 addition & 5 deletions isic/core/templates/core/partials/nav_elements.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
<li tabindex="0">
<a>
Staff
{% if right_arrow %}
<svg class="fill-current" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"/></svg>
{% else %}
<svg class="fill-current" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path d="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"/></svg>
{% endif %}
<svg class="fill-current" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path d="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"/></svg>
</a>
<ul class="p-2 bg-base-100 z-20">
<li><a href="{% url 'ingest-review' %}">Ingest Review</a></li>
Expand Down
2 changes: 2 additions & 0 deletions isic/core/views/images.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ def image_detail(request, isic_id):
"other_lesion_images_count": other_lesion_images.count(),
"MAX_RELATED_SHOW_FIRST_N": MAX_RELATED_SHOW_FIRST_N,
"studies": studies,
"unstructured_metadata": {},
"metadata_versions": [],
}

ctx["metadata"] = dict(sorted(image.metadata.items()))
Expand Down
7 changes: 6 additions & 1 deletion isic/studies/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,12 @@ def annotation_detail(request, pk):

@needs_object_permission("studies.view_study", (Study, "pk", "pk"))
def study_detail(request, pk):
ctx = {"can_edit": request.user.has_perm("studies.edit_study", Study(pk=pk))}
ctx = {
"can_edit": request.user.has_perm("studies.edit_study", Study(pk=pk)),
"pending_tasks": None,
"next_task": None,
"owners": None,
}
ctx["study"] = get_object_or_404(
Study.objects.annotate(
num_annotators=Count("tasks__annotator", distinct=True),
Expand Down

0 comments on commit 1182b97

Please sign in to comment.