Skip to content

Commit

Permalink
Add edit link
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartmaxwell committed Dec 15, 2024
1 parent d249197 commit 33795e2
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions templates/djpress/stuartmnz/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
{% block djpress_content %}

<article>
{% if user.is_authenticated and user.is_staff %}
<div style="text-align: right"><a href="{% url 'admin:djpress_post_change' post.id %}" style="text-decoration: none">✏️</a></div>
{% endif %}

{% post_title outer_tag="h1" %}

{% post_content outer_tag="section" %}
</article>

Expand Down
4 changes: 4 additions & 0 deletions templates/djpress/stuartmnz/snippets/post_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

{% post_wrap %}

{% if user.is_authenticated and user.is_staff %}
<div style="text-align: right"><a href="{% url 'admin:djpress_post_change' post.id %}" style="text-decoration: none">✏️</a></div>
{% endif %}

{% post_title outer_tag="h1" %}

{% post_content outer_tag="section" %}
Expand Down
4 changes: 4 additions & 0 deletions templates/djpress/stuartmnz/snippets/post_summary.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

{% post_wrap %}

{% if user.is_authenticated and user.is_staff %}
<div style="text-align: right"><a href="{% url 'admin:djpress_post_change' post.id %}" style="text-decoration: none">✏️</a></div>
{% endif %}

{% post_title outer_tag="h1" %}

{% post_content outer_tag="section" %}
Expand Down
4 changes: 4 additions & 0 deletions templates/djpress/stuartmnz/snippets/post_title.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

{% post_wrap %}

{% if user.is_authenticated and user.is_staff %}
<div style="text-align: right"><a href="{% url 'admin:djpress_post_change' post.id %}" style="text-decoration: none">✏️</a></div>
{% endif %}

{% post_title outer_tag="h1" %}

<footer>
Expand Down

0 comments on commit 33795e2

Please sign in to comment.