summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Manfre2022-12-06 18:55:35 -0500
committerGitHub2022-12-06 16:55:35 -0700
commitdcf2d801b93e195ad27d349427a7c6aaa8845d61 (patch)
tree4ffb6555603aefa1356d248b5a4af51da81ba4b0
parentc87ad8116fbd19107456147b026e1cc214334b40 (diff)
downloadtakahe-dcf2d801b93e195ad27d349427a7c6aaa8845d61.tar.gz
takahe-dcf2d801b93e195ad27d349427a7c6aaa8845d61.tar.bz2
takahe-dcf2d801b93e195ad27d349427a7c6aaa8845d61.zip
'View in admin' link for post popup menu (#134)
-rw-r--r--activities/models/post.py1
-rw-r--r--static/css/style.css3
-rw-r--r--templates/activities/_post.html5
3 files changed, 8 insertions, 1 deletions
diff --git a/activities/models/post.py b/activities/models/post.py
index 55d2f65..1017694 100644
--- a/activities/models/post.py
+++ b/activities/models/post.py
@@ -219,6 +219,7 @@ class Post(StatorModel):
action_delete = "{view}delete/"
action_edit = "{view}edit/"
action_reply = "/compose/?reply_to={self.id}"
+ admin_edit = "/djadmin/activities/post/{self.id}/change/"
def get_scheme(self, url):
return "https"
diff --git a/static/css/style.css b/static/css/style.css
index 08bde08..1f9220f 100644
--- a/static/css/style.css
+++ b/static/css/style.css
@@ -954,12 +954,13 @@ table.metadata td.name {
.post .actions menu.enabled {
display: block;
+ z-index: 10;
}
.post .actions menu a {
text-align: left;
display: block;
- width: 160px;
+ width: 165px;
font-size: 15px;
}
diff --git a/templates/activities/_post.html b/templates/activities/_post.html
index a813433..e764747 100644
--- a/templates/activities/_post.html
+++ b/templates/activities/_post.html
@@ -49,6 +49,11 @@
<i class="fa-solid fa-arrow-up-right-from-square"></i> See Original
</a>
{% endif %}
+ {% if request.user.admin %}
+ <a href="{{ post.urls.admin_edit }}">
+ <i class="fa-solid fa-gear"></i> View In Admin
+ </a>
+ {% endif %}
</menu>
</div>
{% endif %}