Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@
<a href="#communications--{{activity.id}}" class="flex gap-1 hover:underline">
<span class="text-fg-muted">
{% if not submission_title and activity|user_can_see_related:request.user %}
{% blocktrans with related_name=activity.related_object|model_verbose_name|with_indefinite_article %}commented on {{ related_name }}{% endblocktrans %}
{% if activity.related_object|is_determination %}
{% trans "message from determination" %}
{% else %}
{% blocktrans with related_name=activity.related_object|model_verbose_name|with_indefinite_article %}commented on {{ related_name }}{% endblocktrans %}
{% endif %}
{% else %}
{% trans "commented" %}
{% endif %}
Expand Down
6 changes: 6 additions & 0 deletions hypha/apply/utils/templatetags/apply_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ def instance_verbose_name(instance):
return model_verbose_name(instance)


@register.filter
def is_determination(instance):
Determination = apps.get_model("determinations", "Determination")
return isinstance(instance, Determination)


@register.filter
def format_number_as_currency(amount: float | decimal.Decimal | str | None):
"""Formats a number as currency"""
Expand Down