annotate gpp/templates/news/story.html @ 300:58e9b8b2965f

Fixing #135; adjusted cache timeout value to 60 seconds.
author Brian Neal <bgneal@gmail.com>
date Tue, 11 Jan 2011 04:04:44 +0000
parents 1246a4f1ab4f
children daa2916f5b34
rev   line source
gremmie@1 1 {% extends 'news/base.html' %}
gremmie@1 2 {% load tagging_tags %}
gremmie@1 3 {% load comment_tags %}
bgneal@6 4 {% load script_tags %}
gremmie@1 5 {% block title %}News: {{ story.title }}{% endblock %}
gremmie@1 6 {% block news_css %}
gremmie@1 7 <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/comments.css" />
gremmie@1 8 {% endblock %}
gremmie@1 9 {% block custom_js %}
bgneal@6 10 {% if story.can_comment_on %}
bgneal@127 11 {% script_tags "markitup jquery-ui" %}
gremmie@1 12 <script type="text/javascript" src="{{ MEDIA_URL }}js/comments.js"></script>
bgneal@6 13 {% endif %}
gremmie@1 14 {% endblock %}
gremmie@1 15 {% block news_content %}
gremmie@1 16 <h3>{{ story.title }}</h3>
gremmie@1 17 <div class="news-details">
bgneal@204 18 Submitted by {{ story.submitter.username }} on {{ story.date_submitted|date:"F d, Y" }}.
gremmie@1 19 </div>
bgneal@5 20 <hr />
gremmie@1 21 <div class="news-content">
bgneal@240 22 <a href="{% url news-category slug=story.category.slug %}">
gremmie@1 23 <img src="{{ story.category.icon.url }}" alt="{{ story.category.title }}" title="{{ story.category.title }}"
gremmie@1 24 class="news-icon" /></a>
gremmie@1 25 {{ story.short_text|safe }}
gremmie@1 26 {{ story.long_text|safe }}
gremmie@1 27 <br clear="all" />
bgneal@5 28 <hr />
bgneal@24 29 <p>
bgneal@240 30 Category: <a href="{% url news-category slug=story.category.slug %}">{{ story.category.title }}</a>
bgneal@24 31 <a href="{{ story.get_absolute_url }}"><img src="{{ MEDIA_URL }}icons/link.png"
bgneal@24 32 alt="Story Permalink" title="Story Permalink" /></a>
bgneal@24 33 {% if user.is_authenticated %}
bgneal@24 34 <a href="{% url news.views.email_story story.id %}"><img src="{{ MEDIA_URL }}icons/email_go.png"
bgneal@24 35 alt="Send this story to a friend" title="Send this story to a friend" /></a>
bgneal@24 36 {% endif %}
bgneal@24 37 </p>
bgneal@205 38 {% tags_for_object story as story_tags %}
bgneal@205 39 {% if story_tags %}
gremmie@1 40 <div class="news-tags">
bgneal@24 41 <img src="{{ MEDIA_URL }}icons/tag_blue.png" alt="Tags" title="Tags" /> Tags:
gremmie@1 42 <ul>
gremmie@1 43 {% for tag in story_tags %}
bgneal@240 44 <li><a href="{% url news-tag_page tag_name=tag.name %}">{{ tag.name }}</a></li>
gremmie@1 45 {% endfor %}
gremmie@1 46 </ul>
gremmie@1 47 </div>
gremmie@1 48 {% endif %}
gremmie@1 49 </div>
gremmie@1 50 {% get_comment_count for story as comment_count %}
gremmie@1 51 <p>This story has <span id="comment-count">{{ comment_count }}</span> comment{{ comment_count|pluralize }}.</p>
gremmie@1 52 <hr />
gremmie@1 53 {% render_comment_list story %}
gremmie@1 54 {% if story.can_comment_on %}
gremmie@1 55 <p>Leave a comment?</p>
gremmie@1 56 {% render_comment_form for story %}
gremmie@1 57 {% else %}
gremmie@1 58 <p>Comments are closed for this story. If you'd like to share your thoughts on this story
gremmie@1 59 with the site staff, you can <a href="{% url contact-form %}">contact us directly</a>.</p>
gremmie@1 60 {% endif %}
gremmie@1 61 {% endblock %}