Added admin dashboard, refactored user dashboard. Removed old reviews route.
All checks were successful
CI - Build Tonehaus Docker image / tonehaus-ci-build (push) Successful in 1m53s
All checks were successful
CI - Build Tonehaus Docker image / tonehaus-ci-build (push) Successful in 1m53s
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
{% block title %}Album Reviews{% endblock %}
|
||||
{% block body %}
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<h1 class="h4 mb-0">Album reviews</h1>
|
||||
{% if app.user %}
|
||||
<a class="btn btn-success" href="{{ path('review_new') }}">New review</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="row g-3">
|
||||
{% for r in reviews %}
|
||||
<div class="col-12">
|
||||
<div class="card h-100">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title mb-1">{{ r.title }} <span class="text-secondary">(Rating {{ r.rating }}/10)</span></h5>
|
||||
<div class="text-secondary mb-2">{{ r.album.name }} — {{ r.album.artists|join(', ') }}</div>
|
||||
<p class="card-text">{{ r.content|u.truncate(220, '…', false) }}</p>
|
||||
<a class="btn btn-link p-0" href="{{ path('review_show', {id: r.id}) }}">Read more</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<p>No reviews yet.</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
{% block title %}{{ review.title }}{% endblock %}
|
||||
{% block body %}
|
||||
<p><a href="{{ path('review_index') }}">← Back</a></p>
|
||||
<p><a href="{{ path('account_dashboard') }}">← Back to dashboard</a></p>
|
||||
<h1 class="h4">{{ review.title }} <span class="text-secondary">(Rating {{ review.rating }}/10)</span></h1>
|
||||
<p class="text-secondary">
|
||||
{{ review.album.name }} — {{ review.album.artists|join(', ') }}
|
||||
|
||||
Reference in New Issue
Block a user