#25 Public reports
* adds public report rendering for intervention model * adds new routes for report * adds new public_base.html and public_navbar.html * adds lookup table for zoom levels for lanis link generating * moves qr code generating into utils/generators.pypull/30/head
parent
af0fe655b3
commit
ac17d953c6
@ -0,0 +1,119 @@
|
||||
{% 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>{{obj.identifier}}</h3>
|
||||
<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 'Process type' %}</th>
|
||||
<td class="align-middle">{{obj.legal.process_type|default_if_none:""}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{% trans 'Law' %}</th>
|
||||
<td class="align-middle">
|
||||
{% for law in obj.legal.laws.all %}
|
||||
<div class="badge pill-badge rlp-r-outline">{{law.short_name}} - {{law.long_name}}</div>
|
||||
<br>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{% trans 'Registration office' %}</th>
|
||||
<td class="align-middle">{{obj.responsible.registration_office.str_as_office|default_if_none:""}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{% trans 'Registration office file number' %}</th>
|
||||
<td class="align-middle">{{obj.responsible.registration_file_number|default_if_none:""}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{% trans 'Conservation office' %}</th>
|
||||
<td class="align-middle">{{obj.responsible.conservation_office.str_as_office|default_if_none:""}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{% trans 'Conservation office file number' %}</th>
|
||||
<td class="align-middle">{{obj.responsible.conservation_file_number|default_if_none:""}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{% trans 'Intervention handler' %}</th>
|
||||
<td class="align-middle">{{obj.responsible.handler|default_if_none:""}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{% trans 'Compensations' %}</th>
|
||||
<td class="align-middle">
|
||||
{% for comp in obj.compensations.all %}
|
||||
<a href="{% url 'compensation:detail' comp.id %}" target="_blank">
|
||||
{{comp.identifier}}
|
||||
</a>
|
||||
<br>
|
||||
{% empty %}
|
||||
{% trans 'None' %}
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{% trans 'Deductions of eco-accounts' %}</th>
|
||||
<td class="align-middle">
|
||||
{% for deduction in deductions %}
|
||||
<a href="{% url 'compensation:acc-detail' deduction.account.id %}">
|
||||
{{deduction.account.identifier}}
|
||||
</a>
|
||||
<br>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{% trans 'Payments' %}</th>
|
||||
<td class="align-middle">
|
||||
{% if obj.payments.all %}
|
||||
{% trans 'Exist' %}
|
||||
{% else %}
|
||||
{% trans 'None' %}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{% trans 'Registration date' %}</th>
|
||||
<td class="align-middle">{{obj.legal.registration_date|default_if_none:""}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{% trans 'Binding on' %}</th>
|
||||
<td class="align-middle">{{obj.legal.binding_date|default_if_none:""}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{% trans 'Last modified' %}</th>
|
||||
<td class="align-middle">
|
||||
{{obj.created.timestamp|default_if_none:""|naturalday}}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</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 %}
|
Binary file not shown.
@ -0,0 +1,8 @@
|
||||
|
||||
<nav class="navbar navbar-expand-lg navbar-dark">
|
||||
<a href="{% url 'home' %}">
|
||||
<div class="nav-icon badge">
|
||||
<strong>KSP</strong>
|
||||
</div>
|
||||
</a>
|
||||
</nav>
|
@ -0,0 +1,44 @@
|
||||
<!DOCTYPE html>
|
||||
{% load static i18n l10n fontawesome_5 bootstrap4 %}
|
||||
<html lang="{{ language }}">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ base_frontend_title }}</title>
|
||||
<link rel="icon" type="image/ico" href="{% static 'images/ksp-favicon.ico' %}">
|
||||
{% bootstrap_css %}
|
||||
{% bootstrap_javascript jquery='full' %}
|
||||
{% fontawesome_5_static %}
|
||||
<link rel="stylesheet" href="{% static 'css/konova.css' %}">
|
||||
|
||||
{% block head %}
|
||||
{% endblock %}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
{% block header %}
|
||||
{% include 'navbars/public_navbar.html' %}
|
||||
{% endblock %}
|
||||
</header>
|
||||
<div class="container-fluid mt-3 px-5">
|
||||
<div class="">
|
||||
{% for message in messages %}
|
||||
<div class="row alert alert-{{ message.tags }}">
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% block body %}
|
||||
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
{% block footer %}
|
||||
|
||||
{% endblock %}
|
||||
</body>
|
||||
|
||||
|
||||
</html>
|
@ -0,0 +1,14 @@
|
||||
{% extends 'public_base.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block body %}
|
||||
<div class="jumbotron">
|
||||
<h1 class="display-4">{% trans 'Unrecorded data' %}</h1>
|
||||
<hr>
|
||||
<p class="lead">
|
||||
{% blocktrans %}
|
||||
The data you want to see is not recorded and might still be work in progress. Please come back another time.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
</div>
|
||||
{% endblock %}
|
Loading…
Reference in New Issue