#25 Public reports

* adds public report for compensations
* adds/updates translations
* prepares EMA and eco account reports
This commit is contained in:
2021-10-13 17:35:11 +02:00
parent c4a205908a
commit 193ba4c658
17 changed files with 303 additions and 88 deletions

View File

@@ -33,9 +33,11 @@
<th scope="col">
{% trans 'Comment' %}
</th>
{% if is_default_member and has_access %}
<th scope="col">
{% trans 'Action' %}
</th>
{% endif %}
</tr>
</thead>
<tbody>

View File

@@ -6,7 +6,7 @@
LANIS
</button>
</a>
<a href="{% url 'home' %}" class="mr-2">
<a href="{% url 'compensation:report' obj.id %}" class="mr-2">
<button class="btn btn-default" title="{% trans 'Public report' %}">
{% fa5_icon 'file-alt' %}
</button>

View File

@@ -35,9 +35,11 @@
<th scope="col">
{% trans 'Surface' %}
</th>
{% if is_default_member and has_access %}
<th scope="col">
{% trans 'Action' %}
</th>
{% endif %}
</tr>
</thead>
<tbody>

View File

@@ -35,9 +35,11 @@
<th scope="col">
{% trans 'Surface' %}
</th>
{% if is_default_member and has_access %}
<th scope="col">
{% trans 'Action' %}
</th>
{% endif %}
</tr>
</thead>
<tbody>

View File

@@ -6,7 +6,7 @@
LANIS
</button>
</a>
<a href="{% url 'home' %}" class="mr-2">
<a href="{% url 'compensation:acc-report' obj.id %}" class="mr-2">
<button class="btn btn-default" title="{% trans 'Public report' %}">
{% fa5_icon 'file-alt' %}
</button>

View File

@@ -0,0 +1,66 @@
{% extends 'public_base.html' %}
{% load i18n fontawesome_5 humanize %}
{% block body %}
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-6">
<h3>{% trans 'Report' %}</h3>
<h4>{{obj.identifier}}</h4>
<div class="table-container">
<table class="table table-hover">
<tr>
<th class="w-25" scope="row">{% trans 'Title' %}</th>
<td class="align-middle">{{obj.title|default_if_none:""}}</td>
</tr>
<tr>
<th scope="row">{% trans 'compensates intervention' %}</th>
<td class="align-middle">
<a href="{% url 'intervention:report' obj.intervention.id %}">
{{obj.intervention.identifier}}
</a>
</td>
</tr>
<tr>
<th scope="row">{% trans 'Funded by' %}</th>
<td class="align-middle">
{% for funding in obj.fundings.all %}
<div class="badge pill-badge rlp-r-outline">{{funding.short_name}}</div>
<br>
{% endfor %}
</td>
</tr>
<tr>
<th scope="row">{% trans 'Last modified' %}</th>
<td class="align-middle">
{{obj.modified.timestamp|default_if_none:""|naturalday}}
</td>
</tr>
</table>
</div>
{% include 'compensation/detail/compensation/includes/states-before.html' %}
{% include 'compensation/detail/compensation/includes/states-after.html' %}
{% include 'compensation/detail/compensation/includes/actions.html' %}
</div>
<div class="col-sm-12 col-md-12 col-lg-6">
<div class="row">
{% include 'map/geom_form.html' %}
</div>
<div class="row">
{% include 'intervention/detail/includes/comment.html' %}
</div>
<div class="row">
<div class="col-sm-6 col-md-6 col-lg-6">
<h4>{% trans 'Open in browser' %}</h4>
{{ qrcode|safe }}
</div>
<div class="col-sm-6 col-md-6 col-lg-6">
<h4>{% trans 'View in LANIS' %}</h4>
{{ qrcode_lanis|safe }}
</div>
</div>
</div>
</div>
{% endblock %}