{% extends "includes/elements/chips/base.html" %} {% load i18n %} {# Conditionally provide URL if there is an API v3 URL to request from. In the case of pull request versions, API requests 404 #} {% block chip_view_params %}'{% if not version.is_external %}{% url "projects-versions-detail" version.project.slug version.slug %}{% endif %}'{% endblock %} {% block chip_url %} {% url "projects_detail" version.project.slug %}?slug={{ version.slug }} {% endblock %} {% block chip_icon %} {# fmt:off #} {# fmt:off #} {% endblock chip_icon %} {% block chip_text %} {% if version.is_external %}#{% endif %}{{ version.verbose_name }} {% endblock chip_text %} {% block chip_detail %}
{% endblock chip_detail %} {% block popupcard_header %} {% if version.is_external %} {{ version.external_version_name | lower | capfirst }} {{ version.verbose_name }} {% else %} {# Translators: this renders with the version name, example "Version latest" #} {% blocktrans trimmed with version_name=version.verbose_name %} Version {{ version_name }} {% endblocktrans %} {% endif %} {% endblock popupcard_header %} {% block popupcard_right %} {% endblock popupcard_right %} {% block popupcard_meta %} {% endblock popupcard_meta %} {% block popupcard_content %}
{{ version.get_type_display|default:'Commit' }}
{# Skip the Knockout view additions from the API, it responds 404 for external versions #} {# TODO fix the API response or find a better way to provide a doc URL asynchronously #} {% if not version.is_external %}
{% trans "Documentation" %}
{% endif %}
{% endblock popupcard_content %} {% block popupcard_extra %} {# Placeholder for the left #}
{# Translators: this is a checkbox that describes whether the Version instance is enabled for building #} {% trans "Active" %} {# Translators: this is a checkbox that describes whether the Version instance is successfully built #} {% trans "Built" %}
{% endblock popupcard_extra %}