Skip to content

Commit 0193721

Browse files
Merge pull request #175 from stuartmaxwell:edit-link
Add edit link
2 parents d249197 + 33795e2 commit 0193721

File tree

4 files changed

+17
-0
lines changed

4 files changed

+17
-0
lines changed

templates/djpress/stuartmnz/page.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@
55
{% block djpress_content %}
66

77
<article>
8+
{% if user.is_authenticated and user.is_staff %}
9+
<div style="text-align: right"><a href="{% url 'admin:djpress_post_change' post.id %}" style="text-decoration: none">✏️</a></div>
10+
{% endif %}
11+
812
{% post_title outer_tag="h1" %}
13+
914
{% post_content outer_tag="section" %}
1015
</article>
1116

templates/djpress/stuartmnz/snippets/post_detail.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
{% post_wrap %}
44

5+
{% if user.is_authenticated and user.is_staff %}
6+
<div style="text-align: right"><a href="{% url 'admin:djpress_post_change' post.id %}" style="text-decoration: none">✏️</a></div>
7+
{% endif %}
8+
59
{% post_title outer_tag="h1" %}
610

711
{% post_content outer_tag="section" %}

templates/djpress/stuartmnz/snippets/post_summary.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
{% post_wrap %}
44

5+
{% if user.is_authenticated and user.is_staff %}
6+
<div style="text-align: right"><a href="{% url 'admin:djpress_post_change' post.id %}" style="text-decoration: none">✏️</a></div>
7+
{% endif %}
8+
59
{% post_title outer_tag="h1" %}
610

711
{% post_content outer_tag="section" %}

templates/djpress/stuartmnz/snippets/post_title.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
{% post_wrap %}
44

5+
{% if user.is_authenticated and user.is_staff %}
6+
<div style="text-align: right"><a href="{% url 'admin:djpress_post_change' post.id %}" style="text-decoration: none">✏️</a></div>
7+
{% endif %}
8+
59
{% post_title outer_tag="h1" %}
610

711
<footer>

0 commit comments

Comments
 (0)