I lowkey forgot to commit
This commit is contained in:
22
templates/review/show.html.twig
Normal file
22
templates/review/show.html.twig
Normal file
@@ -0,0 +1,22 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
{% block title %}{{ review.title }}{% endblock %}
|
||||
{% block body %}
|
||||
<p><a href="{{ path('review_index') }}">← Back</a></p>
|
||||
<h1 class="h4">{{ review.title }} <span class="text-secondary">(Rating {{ review.rating }}/10)</span></h1>
|
||||
<p class="text-secondary">{{ review.albumName }} — {{ review.albumArtist }} ({{ review.spotifyAlbumId }})</p>
|
||||
<article class="mb-3">
|
||||
<p>{{ review.content|nl2br }}</p>
|
||||
</article>
|
||||
|
||||
{% if is_granted('REVIEW_EDIT', review) %}
|
||||
<div class="d-flex gap-2">
|
||||
<a class="btn btn-outline-secondary" href="{{ path('review_edit', {id: review.id}) }}">Edit</a>
|
||||
<form action="{{ path('review_delete', {id: review.id}) }}" method="post" onsubmit="return confirm('Delete this review?')">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token('delete_review_' ~ review.id) }}" />
|
||||
<button class="btn btn-danger" type="submit">Delete</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user