Browse Source

posts editable for only for author

newsletter
Esther Kleinhenz 6 years ago
parent
commit
4b28a5a91b
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      application/templates/post_detail.html

+ 2
- 0
application/templates/post_detail.html View File

{% else %} {% else %}
<a class="btn btn-outline-dark" href="{% url 'post_publish' pk=post.pk %}">Publish</a> <a class="btn btn-outline-dark" href="{% url 'post_publish' pk=post.pk %}">Publish</a>
{% endif %} {% endif %}
{% if user.is_staff and user == post.author %}
<a class="btn btn-outline-dark" href="{% url 'post_edit' pk=post.pk %}"> <a class="btn btn-outline-dark" href="{% url 'post_edit' pk=post.pk %}">
<span class="glyphicon glyphicon-pencil">Edit</span> <span class="glyphicon glyphicon-pencil">Edit</span>
</a> </a>
<a class="btn btn-outline-dark" href="{% url 'post_remove' pk=post.pk %}"> <a class="btn btn-outline-dark" href="{% url 'post_remove' pk=post.pk %}">
<span class="glyphicon glyphicon-remove">Remove</span> <span class="glyphicon glyphicon-remove">Remove</span>
</a> </a>
{% endif %}
<h1>{{ post.title }}</h1> <h1>{{ post.title }}</h1>
<p>{{ post.text|linebreaksbr }}</p> <p>{{ post.text|linebreaksbr }}</p>
</div> </div>

Loading…
Cancel
Save