Photo management and various fixes.
CI / Docker Lint (push) Failing after 23s

- Added admin page to upload and manage media.
- Fixed /setup route.
- Updated dockerfiles to support admin media.
- Improved deploy docs.
This commit is contained in:
2024-09-14 20:53:35 +02:00
parent f1031c14df
commit ee058aa3b3
14 changed files with 452 additions and 9 deletions
@@ -0,0 +1,28 @@
{# templates/admin/photo_manager/index.html.twig #}
{% extends '@EasyAdmin/page/content.html.twig' %}
{% block content_title 'Photo Manager' %}
{% block main %}
<a class="btn btn-primary m-3" href="{{ ea_url().setRoute('admin_photos_upload') }}">
Add new
</a>
<div style="display: flex; flex-direction: row; flex-wrap: wrap; gap: 18px;">
{% for photo in photoList %}
<div class="card text-center" style="width: 40%;">
<p>{{photo.filename}}</p>
<img src="{{ asset(photo.url) }}" style="max-width: 80%;"/>
<br>
<a class="btn btn-outline-primary m-2">
<i class="fas fa-clipboard">&nbsp;&nbsp;Copy!</i>
</a>
<a class="btn btn-primary m-2 mt-1" href="{{ ea_url().setRoute('admin_photos_remove', { filename: photo.filename }) }}">
Delete
</a>
</div>
{% endfor %}
</div>
{% endblock %}
@@ -0,0 +1,10 @@
{# templates/bundles/EasyAdminBundle/layout.html.twig #}
{# DO THIS: the '!' symbol tells Symfony to extend from the original template #}
{% extends '@!EasyAdmin/layout.html.twig' %}
{% block javascripts %}
{% block importmap %}
{{ importmap('app') }}
{% endblock %}{% endblock %}