-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: JP Bruins Slot <[email protected]> Co-authored-by: Jan Klopper <[email protected]> Co-authored-by: ammar92 <[email protected]> Co-authored-by: Madelon D <[email protected]> Co-authored-by: noamblitz <[email protected]> Co-authored-by: Donny Peeters <[email protected]> Co-authored-by: noamblitz <[email protected]> Co-authored-by: stephanie0x00 <[email protected]>
- Loading branch information
1 parent
c6c3638
commit a70ff24
Showing
11 changed files
with
272 additions
and
56 deletions.
There are no files selected for viewing
36 changes: 24 additions & 12 deletions
36
rocky/reports/templates/report_overview/report_history.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,26 @@ | ||
{% extends "layouts/base.html" %} | ||
|
||
{% load i18n %} | ||
{% load static %} | ||
|
||
{% block content %} | ||
{% include "header.html" %} | ||
|
||
<main id="main-content" tabindex="-1" class="katalogus"> | ||
<section> | ||
{% include "report_overview/report_overview_header.html" %} | ||
{% include "report_overview/report_overview_navigation.html" with active="history" %} | ||
|
||
<div class="horizontal-scroll"> | ||
<h2>{% translate "Reports history" %}</h2> | ||
<p>{% translate "An overview of all your generated reports." %}</p> | ||
<p class="de-emphasized"> | ||
{% blocktranslate with length=reports|length total=total_oois %}Showing {{ length }} of {{ total }} reports{% endblocktranslate %} | ||
</p> | ||
{% include "report_overview/report_history_table.html" %} | ||
{% include "partials/list_paginator.html" %} | ||
|
||
<section> | ||
<div class="horizontal-scroll"> | ||
<h2>{% translate "Reports history" %}</h2> | ||
<p>{% translate "An overview of all your generated reports." %}</p> | ||
<p class="de-emphasized"> | ||
{% blocktranslate with length=reports|length total=total_oois %}Showing {{ length }} of {{ total }} reports{% endblocktranslate %} | ||
</p> | ||
{% include "report_overview/report_history_table.html" %} | ||
{% include "partials/list_paginator.html" %} | ||
|
||
</div> | ||
</section> | ||
</div> | ||
</section> | ||
</main> | ||
{% endblock content %} |
16 changes: 0 additions & 16 deletions
16
rocky/reports/templates/report_overview/report_overview.html
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
rocky/reports/templates/report_overview/scheduled_reports.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{% extends "layouts/base.html" %} | ||
|
||
{% load i18n %} | ||
{% load static %} | ||
|
||
{% block content %} | ||
{% include "header.html" %} | ||
|
||
<main id="main-content" tabindex="-1" class="katalogus"> | ||
<section> | ||
{% include "report_overview/report_overview_header.html" %} | ||
{% include "report_overview/report_overview_navigation.html" with active="scheduled" %} | ||
|
||
<div class="horizontal-scroll"> | ||
<h2>{% translate "Scheduled reports" %}</h2> | ||
<p>{% translate "View your scheduled reports." %}</p> | ||
<p class="de-emphasized"> | ||
{% blocktranslate with length=scheduled_reports|length total=total_oois %}Showing {{ length }} scheduled reports{% endblocktranslate %} | ||
</p> | ||
{% include "report_overview/scheduled_reports_table.html" %} | ||
{% include "partials/list_paginator.html" %} | ||
|
||
</div> | ||
</section> | ||
</main> | ||
{% endblock content %} |
89 changes: 89 additions & 0 deletions
89
rocky/reports/templates/report_overview/scheduled_reports_table.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
{% load i18n %} | ||
{% load ooi_extra %} | ||
{% load report_extra %} | ||
|
||
<div class="horizontal-scroll"> | ||
<table> | ||
<caption class="visually-hidden">{% translate "Scheduled reports:" %}</caption> | ||
<thead> | ||
<tr> | ||
<th scope="col">{% translate "Report Name" %}</th> | ||
<th scope="col">{% translate "Subreport Name" %}</th> | ||
<th scope="col">{% translate "Report types" %}</th> | ||
<th scope="col">{% translate "Scheduled for" %}</th> | ||
<th scope="col">{% translate "Recurrence" %}</th> | ||
<th scope="col"></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for schedule in scheduled_reports %} | ||
{% if schedule.recipe %} | ||
<tr> | ||
<td class="nowrap">{{ schedule.recipe.report_name_format }}</td> | ||
<td class="nowrap">{{ schedule.recipe.subreport_name_format }}</td> | ||
<td> | ||
{% for report_type in schedule.recipe.report_types %} | ||
{% if forloop.counter0 < 2 %} | ||
<span class="label tags-color-{{ report_type|get_report_type_label_style }}">{{ report_type|get_report_type_name }}</span> | ||
{% endif %} | ||
{% if forloop.counter0 == 2 %} | ||
<span class="label tags-color-grey-2">+ {{ schedule.recipe.report_types|length|add:"-2" }}</span> | ||
{% endif %} | ||
{% endfor %} | ||
</td> | ||
<td class="nowrap">{{ schedule.deadline_at }}</td> | ||
<td class="nowrap">{{ schedule.cron }}</td> | ||
{% if schedule.reports %} | ||
<td class="actions"> | ||
<button class="expando-button" | ||
data-icon-open-class="icon ti-chevron-down" | ||
data-icon-close-class="icon ti-chevron-up" | ||
data-close-label="{% translate "Close details" %}"> | ||
{% translate "Open details" %} | ||
</button> | ||
</td> | ||
{% else %} | ||
<td></td> | ||
{% endif %} | ||
</tr> | ||
{% if schedule.reports %} | ||
<tr class="expando-row"> | ||
<td colspan="6"> | ||
<table> | ||
<caption class="visually-hidden">{% translate "Scheduled Reports:" %}</caption> | ||
<thead> | ||
<tr> | ||
<th scope="col">{% translate "Name" %}</th> | ||
<th scope="col">{% translate "Report type" %}</th> | ||
<th scope="col">{% translate "Input Object" %}</th> | ||
<th scope="col">{% translate "Reference date" %}</th> | ||
<th scope="col">{% translate "Creation date" %}</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for report in schedule.reports %} | ||
<tr> | ||
<td> | ||
<a href="{% url "view_report" organization.code %}?report_id={{ report.reference }}&observed_at={{ report.observed_at|date:"Y-m-d H:i:s:u" }}" | ||
title="{% translate "Show report details" %}">{{ report.name }}</a> | ||
</td> | ||
<td> | ||
<span class="label tags-color-{{ report.report_type|get_report_type_label_style }}">{{ report.report_type|get_report_type_name }}</span> | ||
</td> | ||
<td> | ||
{% for ooi in report.input_oois %}<span>{{ ooi|human_readable }}</span>{% endfor %} | ||
</td> | ||
<td class="nowrap">{{ report.observed_at|date }}</td> | ||
<td class="nowrap">{{ report.date_generated }}</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
</td> | ||
</tr> | ||
{% endif %} | ||
{% endif %} | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.