-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
110 additions
and
1 deletion.
There are no files selected for viewing
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
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,69 @@ | ||
{% extends "page.html" %} | ||
|
||
{% block title %}{{ report.title }} - {{ _('Reports') }} - {{ super() }}{% endblock %} | ||
|
||
{% block breadcrumb_content %} | ||
{{ h.build_nav('reports', _('Reports')) }} | ||
{{ h.build_nav('report-org' if '/organization' in request.environ.get('PATH_INFO', '') else 'report', report.title, report_name=report_name) }} | ||
{% endblock%} | ||
|
||
{% block primary_content_inner %} | ||
<h1>{{ report.title }}</h1> | ||
<p>{{ report.description }}</p> | ||
<p> | ||
{{ _('Generated') }}: {{ h.report__render_datetime(report_date, '%d/%m/%Y %H:%M') }} | ||
</p> | ||
|
||
{% if options %} | ||
<h3>{{ _('Options') }}</h3> | ||
<form action=""> | ||
{% for key, value in options.items() %} | ||
{% if key in options_html %} | ||
{{ options_html[key]|safe }} | ||
{% else %} | ||
{{ key }}: {{ value }} | ||
<input type="hidden" name="{{ key }}" value="{{ value }}"/> | ||
{% endif %} | ||
<br/> | ||
{% endfor %} | ||
</form> | ||
{% endif %} | ||
|
||
{% if are_some_results %} | ||
<div class="pull-right"> | ||
{{ _('Download') }}: | ||
<a class="btn btn-primary" href="{{ h.report__relative_url_for(format='csv') }}">CSV</a> | ||
<a class="btn btn-primary" href="{{ h.report__relative_url_for(format='json') }}">JSON</a> | ||
</div> | ||
{% endif %} | ||
<h3>{{ _('Results') }}</h3> | ||
{% if not are_some_results %} | ||
<p>{{ _('No results found.') }}</p> | ||
{% else %} | ||
<div class="pull-left"> | ||
{% snippet report_template, table=data['table'], data=data, report_name=report_name, options=options %} | ||
</div> | ||
{% endif %} | ||
</div> | ||
{% endblock%} | ||
|
||
{% block scripts %} | ||
{{ super() }} | ||
<!--! Tablesorter allows table sorting by clicking on each column --> | ||
<script type="text/javascript" src="/scripts/vendor/jquery.tablesorter.min.js"></script> | ||
<script type="text/javascript"> | ||
//<![CDATA[ | ||
$(document).ready(function() | ||
{ | ||
$("#report-table").tablesorter({ | ||
dateFormat: "uk", | ||
}); | ||
$(".js-auto-submit").change(function () { | ||
$(this).closest("form").submit(); | ||
}); | ||
} | ||
); | ||
// ]]> | ||
</script> | ||
{% endblock%} | ||
|