{% extends "includes/crud/table_list.html" %} {% load trans blocktrans from i18n %} {% load naturaltime from humanize %} {% load is_admin from privacy_tags %} {% block top_left_menu_items %}
{% include "includes/filters/form.html" with fields=filter.form %}
{% endblock top_left_menu_items %} {% block create_button %} {% endblock create_button %} {% block list_placeholder_icon_class %} {% endblock list_placeholder_icon_class %} {% block list_placeholder_header_filtered %} {% trans "No matching builds found" %} {% endblock list_placeholder_header_filtered %} {% block list_placeholder_header_empty %} {% trans "This project doesn't have any builds yet" %} {% endblock list_placeholder_header_empty %} {% block list_placeholder_text_empty %} {% if is_project_admin is not None and is_project_admin or request.user|is_admin:project %} {% trans "Activate a version to start your first build." %} {% endif %} {% endblock list_placeholder_text_empty %} {% block list_item_right_buttons %} {% comment %} Check if the build is attached to a version to protect us against this. This could happened because the version was deleted and we don't delete the build history. Read more about this problem at https://github.com/readthedocs/ext-theme/issues/412 {% endcomment %} {% if object.project and object.version %} {# Note: for better performance, avoid multiple `is_admin` checks. Call this include with `is_project_admin` #} {% if is_project_admin is not None and is_project_admin or request.user|is_admin:project %} {% blocktrans trimmed asvar text_retry %} Rebuild version {% endblocktrans %} {% endif %} {% endif %} {% endblock list_item_right_buttons %} {% block list_item_icon %} {% include "builds/includes/status_icon.html" with build=object circular=True %} {% endblock list_item_icon %} {% block list_item_header %} {% include "builds/includes/build_name.html" with build=object %}
{# Translators: this will read like "Started 1 month, 3 days ago" #} {% blocktrans with object.date|naturaltime as date trimmed %} Started {{ date }} {% endblocktrans %}
{% endblock list_item_header %} {% block list_item_meta_items %} {% if object.version and object.is_external %} #{{ object.version.verbose_name }} {% elif object.commit %} {% with commit=object.commit|slice:"0:8" %} {% blocktrans with commit=commit trimmed asvar text_commit %} View commit {{ commit }} {% endblocktrans %} {{ commit }} {% endwith %} {% endif %} {% endblock list_item_meta_items %} {% block list_item_extra_items %} {# Builds can have a null version #} {% if object.version %}
{% include "includes/elements/chips/version.html" with version=object.version %}
{% endif %} {% endblock list_item_extra_items %}