]> git.datanom.net - flask-test.git/blobdiff - app/templates/post.html
final
[flask-test.git] / app / templates / post.html
index d55ba606bf8dee0a901779ab8d5542eaeecda237..b13f22740046584d9a899fced2612370e915d484 100644 (file)
@@ -1,5 +1,12 @@
-<table>
-    <tr valign="top">
-        <td><img src="{{ post.author.avatar(50) }}"></td><td><i>{{ post.author.nickname }} says:</i><br>{{ post.body }}</td>
+<table class="table table-hover">
+    <tr>
+        <td width="70px"><a href="{{ url_for('user', nickname=post.author.nickname) }}"><img src="{{ post.author.avatar(70) }}" /></a></td>
+        <td>
+            <p><a href="{{ url_for('user', nickname=post.author.nickname) }}">{{ post.author.nickname }}</a> said {{ momentjs(post.timestamp).fromNow() }}:</p>
+            <p><strong>{{ post.body }}</strong></p>
+           {% if post.author.id == g.user.id %}
+               <div><a href="{{ url_for('delete', id=post.id) }}">Delete</a></div>
+           {% endif %}
+        </td>
     </tr>
 </table>
This page took 0.028802 seconds and 5 git commands to generate.