show feedback qr code on facility detail page

This commit is contained in:
Thomas Steen Rasmussen 2020-08-11 14:30:26 +02:00
parent a640f35fd8
commit f6859d9094
2 changed files with 9 additions and 0 deletions

View file

@ -2,6 +2,7 @@
{% load leaflet_tags %}
{% load static %}
{% load commonmark %}
{% load bornhack %}
{% block extra_head %}
{% leaflet_css %}
@ -77,6 +78,9 @@
<a href="{% url "facilities:facility_list" camp_slug=camp.slug facility_type_slug=facilitytype.slug %}" class="btn btn-default"><i class="fas fa-undo"></i> Back to {{ facilitytype.name }} list</a>
</p>
<div id="map" class="map"></div>
<hr>
<h4>Feedback QR Code</h4>
<img src="{% feedbackqr facility %}">
</div>
</div>

View file

@ -22,3 +22,8 @@ def truefalseicon(value):
)
else:
return "what is this"
@register.simple_tag(takes_context=True)
def feedbackqr(context, facility):
return facility.get_feedback_qr(request=context["request"])