]> gitweb.factorcode.org Git - factor.git/blob - extra/webapps/blogs/view-post.xml
Better support for rest parameters on URLs
[factor.git] / extra / webapps / blogs / view-post.xml
1 <?xml version='1.0' ?>
2
3 <t:chloe xmlns:t="http://factorcode.org/chloe/1.0">
4
5         <t:atom t:href="$blogs/post.atom" t:rest="id">
6                 <t:label t:name="author" />: <t:label t:name="title" />
7         </t:atom>
8
9         <t:atom t:href="$blogs/by.atom" t:rest="author">
10                 Recent Posts by <t:label t:name="author" />
11         </t:atom>
12
13         <t:title> <t:label t:name="author" />: <t:label t:name="title" /> </t:title>
14
15         <p class="posting-body">
16                 <t:farkup t:name="content" />
17         </p>
18
19         <div class="posting-footer">
20                 Post by
21                 <t:a t:href="$blogs/" t:rest="author">
22                         <t:label t:name="author" />
23                 </t:a>
24                 on
25                 <t:label t:name="date" />
26                 |
27                 <t:a t:href="$blogs/edit-post" t:rest="id">Edit Post</t:a>
28                 |
29                 <t:button t:action="$blogs/delete-post" t:for="id,author" class="link-button link">Delete Post</t:button>
30         </div>
31
32         <t:bind-each t:name="comments">
33                 <hr/>
34
35                 <p class="comment-header">
36                         Comment by <t:label t:name="author" /> on <t:label t:name="date" />:
37                 </p>
38
39                 <p class="posting-body">
40                         <t:farkup t:name="content" />
41                 </p>
42                 
43                 <t:button t:action="$blogs/delete-comment" t:for="id,parent" class="link-button link">Delete Comment</t:button>
44
45         </t:bind-each>
46
47         <t:bind t:name="new-comment">
48
49                 <h2>New Comment</h2>
50
51                 <div class="post-form">
52                         <t:form t:action="$blogs/new-comment" t:for="parent">
53                                 <p><t:textarea t:name="content" t:rows="20" t:cols="60" /></p>
54                                 <p><input type="SUBMIT" value="Done" /></p>
55                         </t:form>
56                 </div>
57
58         </t:bind>
59
60 </t:chloe>