33 lines
1.2 KiB
HTML
33 lines
1.2 KiB
HTML
{% extends 'blog/base.html' %}
|
|
|
|
{% block content %}
|
|
<div class="post">
|
|
<span class="delete"><a href='#deletionDialog';"><i class="fa fa-trash"></i></a></span>
|
|
<span class="edit"><a href="{% url 'post_edit' pk=post.pk %}"><i class="fa fa-pencil"></i></a></span>
|
|
<h1>{{ post.title }}</h1>
|
|
{% if post.published_date %}
|
|
<div class="date"><i class="fa fa-calendar"></i> {{ post.published_date}}</div>
|
|
{% endif %}
|
|
{% if post.tags.names %}
|
|
<div class="tag">
|
|
<i class="fa fa-tags"></i>
|
|
{% for tag in post.tags.names %}
|
|
<a href="{% url 'post_list' tag=tag%}">{{ tag }}</a>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
<p>{{ post.text|safe|linebreaksbr }}</p>
|
|
<div id="deletionDialog" class="dialog">
|
|
<div>
|
|
<a class="close" href="">x</a>
|
|
<span style="margin: auto">Удалить пост "{{ post.title }}"? </span>
|
|
<form method="POST" >{% csrf_token %}
|
|
<input type=hidden name="id" value="{{ post.pk }}">
|
|
<input type="submit" name="action" value="delete" onclick="location.href = '#'">
|
|
<input type="button" value="cancel" onclick="location.href='#'">
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|