comparison gpp/templates/news/story_summary.html @ 310:daa2916f5b34

Fixing 145; New url tag behavior (forwards compatibility) in Django 1.3.
author Brian Neal <bgneal@gmail.com>
date Thu, 20 Jan 2011 04:03:48 +0000
parents 1246a4f1ab4f
children 88b2b9cb8c1f
comparison
equal deleted inserted replaced
309:8a0bae48b6ca 310:daa2916f5b34
1 {% load url from future %}
1 {% load tagging_tags %} 2 {% load tagging_tags %}
2 {% load comment_tags %} 3 {% load comment_tags %}
3 {% get_comment_count for story as comment_count %} 4 {% get_comment_count for story as comment_count %}
4 <div class="news-story-container"> 5 <div class="news-story-container">
5 {% if on_home %} 6 {% if on_home %}
8 <h4><a href="{{ story.get_absolute_url }}">{{ story.title }}</a></h4> 9 <h4><a href="{{ story.get_absolute_url }}">{{ story.title }}</a></h4>
9 {% endif %} 10 {% endif %}
10 <div class="news-details"> 11 <div class="news-details">
11 Submitted by {{ story.submitter.username }} on {{ story.date_submitted|date:"F d, Y" }}. 12 Submitted by {{ story.submitter.username }} on {{ story.date_submitted|date:"F d, Y" }}.
12 </div> 13 </div>
13 <a href="{% url news-category slug=story.category.slug %}"> 14 <a href="{% url 'news-category' slug=story.category.slug %}">
14 <img src="{{ story.category.icon.url }}" alt="{{ story.category.title }}" title="{{ story.category.title }}" 15 <img src="{{ story.category.icon.url }}" alt="{{ story.category.title }}" title="{{ story.category.title }}"
15 class="news-icon" /></a> 16 class="news-icon" /></a>
16 <div class="news-content"> 17 <div class="news-content">
17 {{ story.short_text|safe }} 18 {{ story.short_text|safe }}
18 </div> 19 </div>
22 <a href="{{ story.get_absolute_url }}">There is more to this story, continue reading ...</a> 23 <a href="{{ story.get_absolute_url }}">There is more to this story, continue reading ...</a>
23 </p> 24 </p>
24 {% endif %} 25 {% endif %}
25 <hr /> 26 <hr />
26 <p> 27 <p>
27 Category: <a href="{% url news-category slug=story.category.slug %}">{{ story.category.title }}</a> 28 Category: <a href="{% url 'news-category' slug=story.category.slug %}">{{ story.category.title }}</a>
28 <img src="{{ MEDIA_URL }}icons/comments.png" alt="Comments" title="Comments" /> 29 <img src="{{ MEDIA_URL }}icons/comments.png" alt="Comments" title="Comments" />
29 <a href="{{ story.get_absolute_url }}">{{ comment_count }} comment{{ comment_count|pluralize }}</a> 30 <a href="{{ story.get_absolute_url }}">{{ comment_count }} comment{{ comment_count|pluralize }}</a>
30 <a href="{{ story.get_absolute_url }}"><img src="{{ MEDIA_URL }}icons/link.png" alt="Permalink" title="Permalink" /></a> 31 <a href="{{ story.get_absolute_url }}"><img src="{{ MEDIA_URL }}icons/link.png" alt="Permalink" title="Permalink" /></a>
31 {% if user.is_authenticated %} 32 {% if user.is_authenticated %}
32 <a href="{% url news.views.email_story story.id %}"><img src="{{ MEDIA_URL }}icons/email_go.png" 33 <a href="{% url 'news.views.email_story' story.id %}"><img src="{{ MEDIA_URL }}icons/email_go.png"
33 alt="Send this story to a friend" title="Send this story to a friend" /></a> 34 alt="Send this story to a friend" title="Send this story to a friend" /></a>
34 {% endif %} 35 {% endif %}
35 </p> 36 </p>
36 {% tags_for_object story as story_tags %} 37 {% tags_for_object story as story_tags %}
37 {% if story_tags %} 38 {% if story_tags %}
38 <div class="news-tags"> 39 <div class="news-tags">
39 <img src="{{ MEDIA_URL }}icons/tag_blue.png" alt="Tags" title="Tags" /> Tags: 40 <img src="{{ MEDIA_URL }}icons/tag_blue.png" alt="Tags" title="Tags" /> Tags:
40 <ul> 41 <ul>
41 {% for tag in story_tags %} 42 {% for tag in story_tags %}
42 <li><a href="{% url news-tag_page tag_name=tag %}">{{ tag }}</a></li> 43 <li><a href="{% url 'news-tag_page' tag_name=tag %}">{{ tag }}</a></li>
43 {% endfor %} 44 {% endfor %}
44 </ul> 45 </ul>
45 </div> 46 </div>
46 {% endif %} 47 {% endif %}
47 </div> 48 </div>