annotate gpp/templates/news/story.html @ 372:7c7201f942fe

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