[cmsiki-svn] SF.net SVN: cmsiki: [15] trunk/cmsiki
Status: Pre-Alpha
Brought to you by:
cnu
From: <cn...@us...> - 2007-03-28 01:25:05
|
Revision: 15 http://cmsiki.svn.sourceforge.net/cmsiki/?rev=15&view=rev Author: cnu Date: 2007-03-27 12:14:07 -0700 (Tue, 27 Mar 2007) Log Message: ----------- added comments to category pages added category list page Modified Paths: -------------- trunk/cmsiki/templates/story/category_detail.html trunk/cmsiki/templates/story/story_archive.html trunk/cmsiki/urls.py Added Paths: ----------- trunk/cmsiki/templates/story/category_list.html Modified: trunk/cmsiki/templates/story/category_detail.html =================================================================== --- trunk/cmsiki/templates/story/category_detail.html 2007-03-27 19:00:54 UTC (rev 14) +++ trunk/cmsiki/templates/story/category_detail.html 2007-03-27 19:14:07 UTC (rev 15) @@ -1,5 +1,5 @@ {% extends "base.html" %} - +{% load comments.comments %} {% block title %}{{ object.name }}Category{% endblock %} {% block post %} @@ -12,15 +12,18 @@ {% else %} {% for story in object.story_set.all %} - +{% get_free_comment_count for story.story story.id as comment_count %} <div class="post"> <h2><a href="{{ story.get_absolute_url }}">{{ story.title }}</a></h2> <div class="postinfo">Posted on <span class="postdate">{{ story.pub_date|date:"F j, Y" }}</span> by <strong>{{ story.author }}</strong></div> {{ story.replaced_body }} - <div class="postinfo">Posted under category <a href="/category/{{ story.category }}">{{ story.category }}</a>.</div> + <div class="postinfo"> + Posted under category <a href="/category/{{ story.category }}">{{ story.category }}</a> | + <a href="{{ story.get_absolute_url }}">{{ comment_count }} Comments</a> + </div> </div> {% endfor %} -</div> + {% endifequal %} {% endblock %} Added: trunk/cmsiki/templates/story/category_list.html =================================================================== --- trunk/cmsiki/templates/story/category_list.html (rev 0) +++ trunk/cmsiki/templates/story/category_list.html 2007-03-27 19:14:07 UTC (rev 15) @@ -0,0 +1,17 @@ +{% extends "base.html" %} + +{% block title %}Categories{% endblock %} + +{% block post %} +<div class="post"> + <h2>List of Categories</h2> + <ul class="linklist"> + {% for object in object_list %} + <li><a href="{{ object }}/">{{ object }}</a> ({{ object.story_set.count }})</li> + {% endfor %} + </ul> + +</div> +{% endblock %} + + Modified: trunk/cmsiki/templates/story/story_archive.html =================================================================== --- trunk/cmsiki/templates/story/story_archive.html 2007-03-27 19:00:54 UTC (rev 14) +++ trunk/cmsiki/templates/story/story_archive.html 2007-03-27 19:14:07 UTC (rev 15) @@ -17,5 +17,4 @@ </div> </div> {% endfor %} -</div> {% endblock %} Modified: trunk/cmsiki/urls.py =================================================================== --- trunk/cmsiki/urls.py 2007-03-27 19:00:54 UTC (rev 14) +++ trunk/cmsiki/urls.py 2007-03-27 19:14:07 UTC (rev 15) @@ -37,6 +37,7 @@ ) urlpatterns += patterns('django.views.generic.list_detail', + (r'^category/$', 'object_list', dict(category_detail_info)), (r'^category/(?P<slug>[-\w]+)/$', 'object_detail', dict(category_detail_info, slug_field='slug')), ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |