feat(template): add user_id to HtmlPageContext and delete button to diary
This commit is contained in:
@@ -21,6 +21,13 @@
|
||||
<div class="comment">{{ comment.value() }}</div>
|
||||
{% endif %}
|
||||
<div class="watched-at">{{ entry.review().watched_at().format("%Y-%m-%d") }}</div>
|
||||
{% if let Some(uid) = ctx.user_id %}
|
||||
{% if *uid == entry.review().user_id().value() %}
|
||||
<form method="post" action="/reviews/{{ entry.review().id().value() }}/delete">
|
||||
<button type="submit">Delete</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</article>
|
||||
{% else %}
|
||||
|
||||
Reference in New Issue
Block a user