64 lines
2.6 KiB
HTML
64 lines
2.6 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}QR Code — {{ facility.name }}{% endblock %}
|
|
|
|
{% block content %}
|
|
<style>
|
|
@media print {
|
|
.no-print { display: none !important; }
|
|
.navbar, nav, footer { display: none !important; }
|
|
.qr-card { border: none !important; box-shadow: none !important; }
|
|
}
|
|
.qr-card { max-width: 520px; margin: 0 auto; }
|
|
</style>
|
|
|
|
<div class="d-flex justify-content-between align-items-center mb-3 no-print">
|
|
<a href="{{ url_for('facilities.view_facility', facility_id=facility.id) }}"
|
|
class="btn btn-outline-secondary btn-sm">
|
|
<i class="bi bi-arrow-left"></i> Back to Facility
|
|
</a>
|
|
<div class="d-flex gap-2">
|
|
{% if current_user.role in ['admin', 'director', 'customer'] %}
|
|
<form method="POST"
|
|
action="{{ url_for('facilities.facility_qr_regenerate', facility_id=facility.id) }}"
|
|
onsubmit="return confirm('Regenerate this QR code? Any codes already printed and posted for {{ facility.name }} will STOP working and must be reprinted.');">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
|
<button type="submit" class="btn btn-outline-danger btn-sm"
|
|
title="Invalidate the current code and generate a new one">
|
|
<i class="bi bi-arrow-repeat"></i> Regenerate
|
|
</button>
|
|
</form>
|
|
{% endif %}
|
|
<button onclick="window.print()" class="btn btn-primary btn-sm">
|
|
<i class="bi bi-printer"></i> Print
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card shadow-sm qr-card">
|
|
<div class="card-body text-center p-4">
|
|
<div class="text-muted text-uppercase small" style="letter-spacing:.08em;">
|
|
Scan for Facility Status
|
|
</div>
|
|
<h1 class="h3 fw-bold mt-1 mb-3">{{ facility.name }}</h1>
|
|
|
|
<img src="{{ url_for('facilities.facility_qr_png', facility_id=facility.id) }}"
|
|
alt="QR code for {{ facility.name }}"
|
|
style="width:260px;height:260px;max-width:100%;" class="mb-3">
|
|
|
|
<p class="mb-1">Scan this code with your phone camera to see this facility's
|
|
recent cleaning quality and to <strong>report a problem</strong>.</p>
|
|
|
|
{% if public_url %}
|
|
<div class="small text-muted mt-3">
|
|
Or visit:<br>
|
|
<a href="{{ public_url }}" class="text-break">{{ public_url }}</a>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<p class="text-center text-muted small mt-3 no-print">
|
|
Tip: print this and post it at the facility entrance or in each restroom.
|
|
</p>
|
|
{% endblock %}
|