Admin Panel Improvements:
- Updated custom admin controllers to EasyAdmin AdminRoutes. - Added Admin error page. - Various fixes and improvements.
This commit is contained in:
@@ -4,25 +4,39 @@
|
||||
{% block content_title 'Photo Manager' %}
|
||||
{% block main %}
|
||||
|
||||
<a class="btn btn-primary m-3" href="{{ ea_url().setRoute('admin_photos_upload') }}">
|
||||
Add new
|
||||
</a>
|
||||
<a class="btn btn-primary m-3" href="{{ path('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"> 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 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"
|
||||
href="javascript:CopyImageLinkToClipboard('{{absolute_url(photo.url)}}')">
|
||||
<i class="fas fa-clipboard"> Copy!</i>
|
||||
</a>
|
||||
<a class="btn btn-danger m-2 mt-1" href="{{ path('admin_photos_remove', { filename: photo.filename }) }}">
|
||||
Delete
|
||||
</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block body_javascript %}
|
||||
|
||||
<script>
|
||||
async function CopyImageLinkToClipboard(imgLink) {
|
||||
try {
|
||||
await navigator.clipboard.writeText(imgLink);
|
||||
} catch (error) {
|
||||
console.error(error.message);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
{% endblock body_javascript %}
|
||||
Reference in New Issue
Block a user