{% extends 'generic/object.html' %}
{% load helpers %}
{% load form_helpers %}
{% load i18n %}

{% block title %}{{ report.name }}{% endblock %}

{% block object_identifier %}
  {{ report.full_name }}
{% endblock %}

{% block breadcrumbs %}
  <li class="breadcrumb-item"><a href="{% url 'extras:report_list' %}">{% trans "Reports" %}</a></li>
  <li class="breadcrumb-item"><a href="{% url 'extras:report_list' %}#module{{ module.pk }}">{{ report.module|bettertitle }}</a></li>
{% endblock breadcrumbs %}

{% block subtitle %}
  {% if report.description %}
    <div class="text-secondary fs-5">
      {{ report.description|markdown }}
    </div>
  {% endif %}
{% endblock subtitle %}

{% block controls %}{% endblock %}

{% block tabs %}
  <ul class="nav nav-tabs">
    <li class="nav-item" role="presentation">
      <a class="nav-link{% if not tab %} active{% endif %}" href="{% url 'extras:report' module=report.module name=report.class_name %}">{% trans "Report" %}</a>
    </li>
    <li class="nav-item" role="presentation">
      <a class="nav-link{% if tab == 'source' %} active{% endif %}" href="{% url 'extras:report_source' module=report.module name=report.class_name %}">{% trans "Source" %}</a>
    </li>
    <li class="nav-item" role="presentation">
      <a class="nav-link{% if tab == 'jobs' %} active{% endif %}" href="{% url 'extras:report_jobs' module=report.module name=report.class_name %}">
        {% trans "Jobs" %} {% badge job_count %}
      </a>
    </li>
  </ul>
{% endblock tabs %}
