Public:
- /escape-rooms: Leaflet + OpenStreetMap map with marker clustering and a
searchable list, both built from a cached slim JSON feed
- /escape-rooms/{id}-{slug}: room detail with a mini-map and user reviews
(rating + title + body, login required)
- /escape-rooms/suggest: visitor submission form with click-to-drop-pin map
and reCAPTCHA v3; new rooms land as pending
Data:
- EscapeRoom / EscapeRoomReview entities (soft-delete), migration
- app:escaperooms:import-osm console command pulls leisure=escape_game from
the Overpass API, upserts by (osmType, osmId), skips locked rows;
--tiled / --area / --bbox options
Admin (new "Website Admin" area, separate from Game Admin):
- src/Website/Controller/AdminEscapeRoomController.php at /admin/escape-rooms:
status-filtered list, new/edit, publish/hide/reject, delete, review removal
- game admin sidebar extracted into a block and cross-linked
Assets: leaflet + leaflet.markercluster; escaperoom-map and escaperoom-detail
Encore entries.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
44 lines
2.9 KiB
Twig
44 lines
2.9 KiB
Twig
{% extends 'website/admin/base.html.twig' %}
|
|
|
|
{% block title %}Reviews — Website Admin{% endblock %}
|
|
|
|
{% block admin_body %}
|
|
<h1 style="margin: 0 0 1.5rem; font-size: 1.5rem; color: #0f172a;">Recent reviews</h1>
|
|
|
|
<div style="background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.07); overflow: hidden;">
|
|
<table class="admin-datatable" style="width: 100%; min-width: 820px; border-collapse: collapse; font-size: 0.88rem;">
|
|
<thead>
|
|
<tr style="background: #f1f5f9; border-bottom: 1px solid #e2e8f0;">
|
|
<th style="padding: 0.7rem 0.9rem; text-align: left; color: #475569;">Date</th>
|
|
<th style="padding: 0.7rem 0.9rem; text-align: left; color: #475569;">Room</th>
|
|
<th style="padding: 0.7rem 0.9rem; text-align: left; color: #475569;">Rating</th>
|
|
<th style="padding: 0.7rem 0.9rem; text-align: left; color: #475569;">Title</th>
|
|
<th style="padding: 0.7rem 0.9rem; text-align: left; color: #475569;">Author</th>
|
|
<th data-sortable="false" style="padding: 0.7rem 0.9rem; text-align: left; color: #475569;">Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for review in reviews %}
|
|
<tr style="border-bottom: 1px solid #f1f5f9;">
|
|
<td style="padding: 0.7rem 0.9rem; color: #475569; white-space: nowrap;">{{ review.createdAt|date('Y-m-d') }}</td>
|
|
<td style="padding: 0.7rem 0.9rem; color: #0f172a;">
|
|
<a href="{{ path('website_admin_escaperoom_edit', {id: review.escapeRoom.id}) }}" style="color: #0f172a;">{{ review.escapeRoom.name }}</a>
|
|
</td>
|
|
<td style="padding: 0.7rem 0.9rem;" data-order="{{ review.rating }}">{{ review.rating }} ★</td>
|
|
<td style="padding: 0.7rem 0.9rem; color: #475569;">{{ review.title }}</td>
|
|
<td style="padding: 0.7rem 0.9rem; color: #475569;">{{ review.author ? review.author.username : '—' }}</td>
|
|
<td style="padding: 0.7rem 0.9rem;" class="er-actions">
|
|
<form method="post" action="{{ path('website_admin_escaperoom_review_delete', {id: review.id}) }}" onsubmit="return confirm('Remove this review?')">
|
|
<input type="hidden" name="_token" value="{{ csrf_token('delete_review_' ~ review.id) }}">
|
|
<button type="submit" class="er-danger">Remove</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr><td colspan="6" style="padding: 2rem; text-align: center; color: #94a3b8;">No reviews yet.</td></tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% endblock %}
|