2021-05-17 16:27:27 -04:00
|
|
|
{% extends 'base/layout.html' %}
|
2020-07-06 13:30:13 -04:00
|
|
|
{% load helpers %}
|
|
|
|
|
|
|
|
{% block title %}{{ report.name }}{% endblock %}
|
|
|
|
|
2021-05-17 16:27:27 -04:00
|
|
|
{% block breadcrumbs %}
|
|
|
|
<li class="breadcrumb-item"><a href="{% url 'extras:report_list' %}">Reports</a></li>
|
|
|
|
<li class="breadcrumb-item"><a href="{% url 'extras:report_list' %}#module.{{ report.module }}">{{ report.module|bettertitle }}</a></li>
|
2020-08-10 15:56:55 -04:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2021-04-18 16:42:28 -07:00
|
|
|
{% if report.description %}
|
2021-06-04 09:47:14 -04:00
|
|
|
<p class="text-muted">{{ report.description|render_markdown }}</p>
|
2021-04-18 16:42:28 -07:00
|
|
|
{% endif %}
|
|
|
|
{% if perms.extras.run_report %}
|
|
|
|
<div class="float-end noprint">
|
|
|
|
<form action="{% url 'extras:report' module=report.module name=report.class_name %}" method="post">
|
|
|
|
{% csrf_token %}
|
|
|
|
<button type="submit" name="_run" class="btn btn-primary">
|
2020-07-06 13:30:13 -04:00
|
|
|
{% if report.result %}
|
2021-04-18 16:42:28 -07:00
|
|
|
<i class="mdi mdi-replay"></i> Run Again
|
|
|
|
{% else %}
|
|
|
|
<i class="mdi mdi-play"></i> Run Report
|
2020-07-06 13:30:13 -04:00
|
|
|
{% endif %}
|
2021-04-18 16:42:28 -07:00
|
|
|
</button>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
<div class="row">
|
2021-04-30 15:55:37 -07:00
|
|
|
<div class="col col-md-12">
|
2021-04-18 16:42:28 -07:00
|
|
|
{% if report.result %}
|
|
|
|
Last run: <a href="{% url 'extras:report_result' job_result_pk=report.result.pk %}">
|
2021-07-06 12:10:29 -04:00
|
|
|
<strong>{{ report.result.created|annotated_date }}</strong>
|
2021-04-18 16:42:28 -07:00
|
|
|
</a>
|
|
|
|
{% endif %}
|
2020-07-06 13:30:13 -04:00
|
|
|
</div>
|
2021-04-18 16:42:28 -07:00
|
|
|
</div>
|
2020-07-06 13:30:13 -04:00
|
|
|
{% endblock %}
|