Introduced post types.
[TownSquare.git] / townsquare / templates / post / view.mako
blobae421fc68f5b84f6c5cb82a07cc116e0ba027151
1 <%inherit file="/base.mako"/>
3 <div class="post">
5 <div class="content">
6 % if hasattr(c.post, 'name') and len(c.post.name) is not 0:
7 <h1>${c.post.name}</h1>
8 % endif
9 <div>
10 ${h.literal(h.markdown.markdown(c.post.content, safe_mode="escape"))}
11 </div>
12 </div>
14 % if c.post.creator is not None:
15 <div class="avatar"><img src="/xib_normal.png" width="32" height="32" /></div>
16 <div class="block details"><small>Posted by <strong><a href="${c.post.creator.url}">${c.post.creator.name}</a></strong> at ${c.post.creation_timestamp}
17 %   if c.post.parent is not None:
18 as response to <a href="${c.post.parent.url}">a post</a>
19 %   endif
20 %   if c.post.get_host() is not None:
21 on <a href="${c.post.get_host().url}">${c.post.get_host().name}</a>
22 %   endif
24 <br />${c.post.children_count()} direct responses, 25 responses in total, 5 reposts, 2 referencing posts, 10 likes
25 </small></div>
26 <div class="clear"></div>
27 % endif
29 </div>
31 <div class="responses">
32 <h3>Responses:</h3>
34   c.post_list = c.post.children
35   c.current_url = c.post.url
37 <%include file="list-embed.mako"/>
38 </div>
41 <!--TODO: channel-->
42 <div>
43 ${h.secure_form(url('/posts/create'))}
44   <div>${h.textarea(name='content', rows=7, cols=40, content=c.content)}</div>
45   <div>
46     ${h.submit(value='Post', name='commit')}
47     ${h.hidden(name='parent_id', value=c.post._id)}
48     ${h.hidden(name='success_redirect', value=c.post.url)}
49   </div>
50 ${h.end_form()}
51 </div>