{% extends "includes/crud/table_list.html" %} {% load blocktrans trans from i18n %} {% load gravatar_url from gravatar %} {% load naturaltime from humanize %} {% load can_revoke_invitation from invitations %} {% comment %} For now, this include is used for secondary listings on maintainer and organization listing views. See these parent templates for examples of using this base. NOTE: do not repeat the patterns here or there. Listing views should not have multiple, competing model lists. {% endcomment %} {% block top_menu %} {% endblock top_menu %} {% block create_button %} {% endblock create_button %} {# Don't use placeholder content to avoid competing with the primary model listing view #} {% block list_placeholder %} {% endblock list_placeholder %} {% block list_item_right_buttons %} {% if request.user|can_revoke_invitation:object %} {% endif %} {% endblock list_item_right_buttons %} {% block list_item_image %} {% firstof object.to_user.email object.to_email as email %} {% firstof object.to_user.username object.to_email as user_display %} {% blocktrans with user=user_display %}Avatar image for {{ user }}{% endblocktrans %} {% endblock list_item_image %} {% block list_item_header %} {% if object.to_user %} {% with full_name=object.to_user.get_full_name %} {% if full_name %} {{ full_name }} {% else %} {{ object.to_user.username }} {% endif %} {% endwith %} {% else %} {{ object.to_email }} {% endif %}
{% if object.to_user %}{{ object.to_user.username }}{% endif %}
{% endblock list_item_header %} {% block list_item_meta_items %}
{% if object.expired %} {# Translators: this will read "Expired 2 weeks ago" #} {% blocktrans trimmed with expiration_delta=object.expiration_date|naturaltime %} Expired {{ expiration_delta }} {% endblocktrans %} {% else %} {# Translators: this will read "Expires 2 weeks from now" #} {% blocktrans trimmed with expiration_delta=object.expiration_date|naturaltime %} Expires {{ expiration_delta }} {% endblocktrans %} {% endif %}
{% endblock list_item_meta_items %} {% block list_item_extra %} {% endblock list_item_extra %}