Mercurial > genshi > mirror
comparison examples/tutorial/geddit/templates/info.html @ 628:9822dfff0fd5 trunk
GenshiTutorial: tweaks to sync with code on wiki page.
author | cmlenz |
---|---|
date | Mon, 03 Sep 2007 19:59:03 +0000 |
parents | abad7c2ebe15 |
children | f779e566884d |
comparison
equal
deleted
inserted
replaced
627:3ed77fbfafa8 | 628:9822dfff0fd5 |
---|---|
3 xmlns:xi="http://www.w3.org/2001/XInclude" | 3 xmlns:xi="http://www.w3.org/2001/XInclude" |
4 xmlns:py="http://genshi.edgewall.org/"> | 4 xmlns:py="http://genshi.edgewall.org/"> |
5 <xi:include href="layout.html" /> | 5 <xi:include href="layout.html" /> |
6 <head> | 6 <head> |
7 <title>${link.title}</title> | 7 <title>${link.title}</title> |
8 <link rel="alternate" title="Geddit: ${link.title}" | 8 <link rel="alternate" type="application/atom+xml" title="Geddit: ${link.title}" |
9 type="application/atom+xml" href="${url('/feed/%s/' % link.id)}" /> | 9 href="${url('/feed/%s/' % link.id)}" /> |
10 <script type="text/javascript"> | 10 <script type="text/javascript"> |
11 function loadCommentForm(a) { | 11 function loadCommentForm(a) { |
12 $.get("${url('/comment/%s/' % link.id)}", {}, function(html) { | 12 $.get("${url('/comment/%s/' % link.id)}", {}, function(html) { |
13 var form = a.hide().parent().after(html).next(); | 13 var form = a.hide().parent().after(html).next(); |
14 function closeForm() { | 14 function closeForm() { |
27 initForm(); | 27 initForm(); |
28 } else { | 28 } else { |
29 if ($("ul.comments").length == 0) { | 29 if ($("ul.comments").length == 0) { |
30 a.parent().before('<ul class="comments"></ul>'); | 30 a.parent().before('<ul class="comments"></ul>'); |
31 } | 31 } |
32 $("ul.comments") | 32 $("ul.comments").append($(elem)); |
33 .find("li.hilite").removeClass("hilite").end() | |
34 .append($(elem).addClass("hilite")).slideDown(); | |
35 closeForm(); | 33 closeForm(); |
36 } | 34 } |
37 }); | 35 }); |
38 return false; | 36 return false; |
39 }); | 37 }); |
57 <ul py:if="link.comments" class="comments"> | 55 <ul py:if="link.comments" class="comments"> |
58 <xi:include href="_comment.html" | 56 <xi:include href="_comment.html" |
59 py:for="num, comment in enumerate(link.comments)" /> | 57 py:for="num, comment in enumerate(link.comments)" /> |
60 </ul> | 58 </ul> |
61 | 59 |
62 <p><a class="action" href="${url('/comment/%s/' % link.id)}">comment</a></p> | 60 <p><a class="action" href="${url('/comment/%s/' % link.id)}">Add comment</a></p> |
63 </body> | 61 </body> |
64 </html> | 62 </html> |