31f43d5 by Arvind at 2013-01-07 |
1 |
<!doctype html> |
347ae26 by Arvind at 2013-01-08 |
2 |
<head> |
|
3 |
<link rel=stylesheet type=text/css href="{{ url_for('static', filename='bootstrap.min.css') }}"> |
|
4 |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> |
|
5 |
<script type="text/javascript"> |
|
6 |
function deletePost(post_id){ |
|
7 |
if(confirm("Do you really want to delete this post?")) |
|
8 |
$.post('/posts/delete/',{'post_id':post_id},function(){alert("The post has been deleted!!")}); |
|
9 |
} |
|
10 |
</script> |
|
11 |
</head> |
31f43d5 by Arvind at 2013-01-07 |
12 |
<body> |
|
13 |
<ul class=entries> |
|
14 |
{% for entry in entries %} |
347ae26 by Arvind at 2013-01-08 |
15 |
<li><h2>{{ entry.title }}</h2>@<b>{{entry.user}}</b> <a href=""><img style="height:15px;" src="{{ url_for('static', filename='bin.png') }}" onclick=deletePost({{ entry.id|string|tojson|safe }});></img></a> |
|
16 |
<p> {{ entry.text|safe }} </p> |
31f43d5 by Arvind at 2013-01-07 |
17 |
{% endfor %} |
|
18 |
</ul> |
|
19 |
</body> |