[WIP] Add button for exporting to PDF
This commit is contained in:
parent
cb6c7f6fda
commit
f3c9297ffd
|
@ -234,6 +234,12 @@
|
|||
</div>
|
||||
<div class="tab-pane fade" id="enviromental_impact">
|
||||
<div class="container-fluid py-3">
|
||||
<div class="d-flex justify-content-end mb-3">
|
||||
<a href="{% url 'device:export_environmental_impact_pdf' object.pk %}" class="btn btn-success">
|
||||
<i class="bi bi-file-earmark-pdf"></i>
|
||||
{% trans 'Export to PDF' %}
|
||||
</a>
|
||||
</div>
|
||||
{% comment %} <h5 class="card-title text-success">Environmental Impact Assessment</h5> {% endcomment %}
|
||||
|
||||
<div class="row g-4 mb-4">
|
||||
|
|
|
@ -10,5 +10,7 @@ urlpatterns = [
|
|||
path("<str:pk>/annotation/add", views.AddAnnotationView.as_view(), name="add_annotation"),
|
||||
path("<str:pk>/document/add", views.AddDocumentView.as_view(), name="add_document"),
|
||||
path("<str:pk>/public/", views.PublicDeviceWebView.as_view(), name="device_web"),
|
||||
path('<str:pk>/export-environmental-impact-pdf/',
|
||||
views.ExportEnvironmentalImpactPDF.as_view(), name='export_environmental_impact_pdf'),
|
||||
|
||||
]
|
||||
|
|
|
@ -169,6 +169,9 @@ class PublicDeviceWebView(TemplateView):
|
|||
return JsonResponse(device_data)
|
||||
|
||||
|
||||
class ExportEnvironmentalImpactPDF(DashboardView, TemplateView):
|
||||
pass
|
||||
|
||||
class AddAnnotationView(DashboardView, CreateView):
|
||||
template_name = "new_annotation.html"
|
||||
title = _("New annotation")
|
||||
|
|
Loading…
Reference in a new issue