diff --git a/templates/blog/blog.html b/templates/blog/blog.html index f35e5c3..e1d2444 100644 --- a/templates/blog/blog.html +++ b/templates/blog/blog.html @@ -27,8 +27,21 @@ {% trans time=post.publish_on|date(_("N j, Y, g:i a")) %} posted on {{ time }}{% endtrans %} {% if post.is_editable_by(request.user) %} - [{{ _('Edit') }}] + [{{ _('Edit') }}] + {% else %} + {% for author in post.authors.all() %} + {% if author.user == request.user %} + {% for post_org in post.organizations.all() %} + {% for org in author.organizations.all() %} + {% if org == post_org %} + [{{ _('Edit') }}] + {% endif %} + {% endfor %} + {% endfor %} + {% endif %} + {% endfor %} {% endif %} +
{% cache 86400 'post_content' post.id MATH_ENGINE %}