]> git.0d.be Git - chloro.git/blobdiff - chloro/phyll/templates/phyll/note_detail.html
enable csrf for live-edit post
[chloro.git] / chloro / phyll / templates / phyll / note_detail.html
index f9d1b0101a60dacc909f22bb12c5a043c024c3f9..06966f499fb48560ca9996b06976e8470e5ac8c4 100644 (file)
@@ -1,9 +1,19 @@
 {% extends "phyll/base.html" %}
 {% load i18n %}
 
+{% block content-class %}post{% endblock %}
+{% block page-title %}{{ object.title }} - {{ block.super }}{% endblock %}
+
 {% block body %}
-<h1>{{ object.title }}</h1>
-<div>{{ object.text|safe }}</div>
+<div>
+<h2>{{ object.title }}</h2>
+<div {% if request.user.is_staff %}contenteditable="true"{% endif %}>{{ object.text|safe }}</div>
+{% if request.user.is_staff %}
+{% csrf_token %}<button id="save">{% trans "Save" %}</button>
+{% endif %}
+
+<div class="meta">{{ object.creation_timestamp|date:"j E Y, H:i"|lower }}</div>
+</div>
 {% endblock %}
 
 {% block bottom-actions %}