comparison gpp/templates/news/story.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 {% extends 'news/base.html' %} 1 {% extends 'news/base.html' %}
2 {% load url from future %}
2 {% load tagging_tags %} 3 {% load tagging_tags %}
3 {% load comment_tags %} 4 {% load comment_tags %}
4 {% load script_tags %} 5 {% load script_tags %}
5 {% block title %}News: {{ story.title }}{% endblock %} 6 {% block title %}News: {{ story.title }}{% endblock %}
6 {% block news_css %} 7 {% block news_css %}
17 <div class="news-details"> 18 <div class="news-details">
18 Submitted by {{ story.submitter.username }} on {{ story.date_submitted|date:"F d, Y" }}. 19 Submitted by {{ story.submitter.username }} on {{ story.date_submitted|date:"F d, Y" }}.
19 </div> 20 </div>
20 <hr /> 21 <hr />
21 <div class="news-content"> 22 <div class="news-content">
22 <a href="{% url news-category slug=story.category.slug %}"> 23 <a href="{% url 'news-category' slug=story.category.slug %}">
23 <img src="{{ story.category.icon.url }}" alt="{{ story.category.title }}" title="{{ story.category.title }}" 24 <img src="{{ story.category.icon.url }}" alt="{{ story.category.title }}" title="{{ story.category.title }}"
24 class="news-icon" /></a> 25 class="news-icon" /></a>
25 {{ story.short_text|safe }} 26 {{ story.short_text|safe }}
26 {{ story.long_text|safe }} 27 {{ story.long_text|safe }}
27 <br clear="all" /> 28 <br clear="all" />
28 <hr /> 29 <hr />
29 <p> 30 <p>
30 Category: <a href="{% url news-category slug=story.category.slug %}">{{ story.category.title }}</a> 31 Category: <a href="{% url 'news-category' slug=story.category.slug %}">{{ story.category.title }}</a>
31 <a href="{{ story.get_absolute_url }}"><img src="{{ MEDIA_URL }}icons/link.png" 32 <a href="{{ story.get_absolute_url }}"><img src="{{ MEDIA_URL }}icons/link.png"
32 alt="Story Permalink" title="Story Permalink" /></a> 33 alt="Story Permalink" title="Story Permalink" /></a>
33 {% if user.is_authenticated %} 34 {% if user.is_authenticated %}
34 <a href="{% url news.views.email_story story.id %}"><img src="{{ MEDIA_URL }}icons/email_go.png" 35 <a href="{% url 'news.views.email_story' story.id %}"><img src="{{ MEDIA_URL }}icons/email_go.png"
35 alt="Send this story to a friend" title="Send this story to a friend" /></a> 36 alt="Send this story to a friend" title="Send this story to a friend" /></a>
36 {% endif %} 37 {% endif %}
37 </p> 38 </p>
38 {% tags_for_object story as story_tags %} 39 {% tags_for_object story as story_tags %}
39 {% if story_tags %} 40 {% if story_tags %}
40 <div class="news-tags"> 41 <div class="news-tags">
41 <img src="{{ MEDIA_URL }}icons/tag_blue.png" alt="Tags" title="Tags" /> Tags: 42 <img src="{{ MEDIA_URL }}icons/tag_blue.png" alt="Tags" title="Tags" /> Tags:
42 <ul> 43 <ul>
43 {% for tag in story_tags %} 44 {% for tag in story_tags %}
44 <li><a href="{% url news-tag_page tag_name=tag.name %}">{{ tag.name }}</a></li> 45 <li><a href="{% url 'news-tag_page' tag_name=tag.name %}">{{ tag.name }}</a></li>
45 {% endfor %} 46 {% endfor %}
46 </ul> 47 </ul>
47 </div> 48 </div>
48 {% endif %} 49 {% endif %}
49 </div> 50 </div>
54 {% if story.can_comment_on %} 55 {% if story.can_comment_on %}
55 <p>Leave a comment?</p> 56 <p>Leave a comment?</p>
56 {% render_comment_form for story %} 57 {% render_comment_form for story %}
57 {% else %} 58 {% else %}
58 <p>Comments are closed for this story. If you'd like to share your thoughts on this story 59 <p>Comments are closed for this story. If you'd like to share your thoughts on this story
59 with the site staff, you can <a href="{% url contact-form %}">contact us directly</a>.</p> 60 with the site staff, you can <a href="{% url 'contact-form' %}">contact us directly</a>.</p>
60 {% endif %} 61 {% endif %}
61 {% endblock %} 62 {% endblock %}