544de4f by Anon Ray at 2013-06-27 1
{% extends "layout.html" %}
2
{% block body %}
347ae26 by Arvind at 2013-01-08 3
<script type="text/javascript">
544de4f by Anon Ray at 2013-06-27 4
  function deletePost(post_id) {
5
    if(confirm("Do you really want to delete this post?")) {
6
      $.post(
7
        '/posts/delete/',
8
        {'post_id': post_id},
9
        function() {
10
          alert("The post has been deleted!!");
11
          window.location.href = '/';
12
        });
13
    }
14
    return false;
15
  }
347ae26 by Arvind at 2013-01-08 16
</script>
544de4f by Anon Ray at 2013-06-27 17
<ul class="entries">
31f43d5 by Arvind at 2013-01-07 18
  {% for entry in entries %}
544de4f by Anon Ray at 2013-06-27 19
    <li>
20
      @<b>{{ entry.who }}</b>
21
      <b>#{{ entry.what }}</b> /{{ entry.where }} {{ entry.how|safe }}
22
      {% if session.logged_in %}
23
      <a class="pull-right" href="#" onclick='deletePost({{entry.id|string|tojson|safe}})'>
24
        <i class="icon-trash"></i>
25
      </a>
26
      {% endif %}
27
    </li>
1a7990c by Arvind at 2013-04-26 28
	{% endfor %}
31f43d5 by Arvind at 2013-01-07 29
</ul>
544de4f by Anon Ray at 2013-06-27 30
{% endblock %}