From 33795e2396bef9c2ad638cd9eef44c198d7b3958 Mon Sep 17 00:00:00 2001 From: Stuart Maxwell Date: Sun, 15 Dec 2024 20:55:02 +1300 Subject: [PATCH] Add edit link --- templates/djpress/stuartmnz/page.html | 5 +++++ templates/djpress/stuartmnz/snippets/post_detail.html | 4 ++++ templates/djpress/stuartmnz/snippets/post_summary.html | 4 ++++ templates/djpress/stuartmnz/snippets/post_title.html | 4 ++++ 4 files changed, 17 insertions(+) diff --git a/templates/djpress/stuartmnz/page.html b/templates/djpress/stuartmnz/page.html index 4de4aa7..5309014 100644 --- a/templates/djpress/stuartmnz/page.html +++ b/templates/djpress/stuartmnz/page.html @@ -5,7 +5,12 @@ {% block djpress_content %}
+ {% if user.is_authenticated and user.is_staff %} +
✏️
+ {% endif %} + {% post_title outer_tag="h1" %} + {% post_content outer_tag="section" %}
diff --git a/templates/djpress/stuartmnz/snippets/post_detail.html b/templates/djpress/stuartmnz/snippets/post_detail.html index d6e4c52..290fa2f 100644 --- a/templates/djpress/stuartmnz/snippets/post_detail.html +++ b/templates/djpress/stuartmnz/snippets/post_detail.html @@ -2,6 +2,10 @@ {% post_wrap %} + {% if user.is_authenticated and user.is_staff %} +
✏️
+ {% endif %} + {% post_title outer_tag="h1" %} {% post_content outer_tag="section" %} diff --git a/templates/djpress/stuartmnz/snippets/post_summary.html b/templates/djpress/stuartmnz/snippets/post_summary.html index 569e1d2..6d8d8f7 100644 --- a/templates/djpress/stuartmnz/snippets/post_summary.html +++ b/templates/djpress/stuartmnz/snippets/post_summary.html @@ -2,6 +2,10 @@ {% post_wrap %} + {% if user.is_authenticated and user.is_staff %} +
✏️
+ {% endif %} + {% post_title outer_tag="h1" %} {% post_content outer_tag="section" %} diff --git a/templates/djpress/stuartmnz/snippets/post_title.html b/templates/djpress/stuartmnz/snippets/post_title.html index 0ad1068..200f64b 100644 --- a/templates/djpress/stuartmnz/snippets/post_title.html +++ b/templates/djpress/stuartmnz/snippets/post_title.html @@ -2,6 +2,10 @@ {% post_wrap %} + {% if user.is_authenticated and user.is_staff %} +
✏️
+ {% endif %} + {% post_title outer_tag="h1" %}