annotate gpp/templates/news/story.html @ 491:7dbdbb08e68c

For #233; add social media sharing buttons to the photo of the day app.
author Brian Neal <bgneal@gmail.com>
date Thu, 20 Oct 2011 01:00:19 +0000
parents f0f3966ea44f
children bdcce55f137e
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 %}
bgneal@484 6 {% load core_tags %}
gremmie@1 7 {% block title %}News: {{ story.title }}{% endblock %}
bgneal@484 8 {% block custom_meta %}
bgneal@484 9 {% open_graph_meta_tags story %}
bgneal@484 10 {% endblock %}
gremmie@1 11 {% block news_css %}
bgneal@312 12 <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/comments.css" />
gremmie@1 13 {% endblock %}
gremmie@1 14 {% block custom_js %}
bgneal@6 15 {% if story.can_comment_on %}
bgneal@127 16 {% script_tags "markitup jquery-ui" %}
bgneal@312 17 <script type="text/javascript" src="{{ STATIC_URL }}js/comments.js"></script>
bgneal@6 18 {% endif %}
gremmie@1 19 {% endblock %}
bgneal@490 20 {% block begin_body %}{% include 'core/social_sharing_begin.html' %}{% endblock %}
gremmie@1 21 {% block news_content %}
bgneal@380 22 <div class="solid-background">
gremmie@1 23 <h3>{{ story.title }}</h3>
gremmie@1 24 <div class="news-details">
bgneal@204 25 Submitted by {{ story.submitter.username }} on {{ story.date_submitted|date:"F d, Y" }}.
gremmie@1 26 </div>
bgneal@5 27 <hr />
gremmie@1 28 <div class="news-content">
bgneal@310 29 <a href="{% url 'news-category' slug=story.category.slug %}">
gremmie@1 30 <img src="{{ story.category.icon.url }}" alt="{{ story.category.title }}" title="{{ story.category.title }}"
gremmie@1 31 class="news-icon" /></a>
gremmie@1 32 {{ story.short_text|safe }}
gremmie@1 33 {{ story.long_text|safe }}
gremmie@1 34 <br clear="all" />
bgneal@5 35 <hr />
bgneal@24 36 <p>
bgneal@310 37 Category: <a href="{% url 'news-category' slug=story.category.slug %}">{{ story.category.title }}</a>
bgneal@312 38 <a href="{{ story.get_absolute_url }}"><img src="{{ STATIC_URL }}icons/link.png"
bgneal@24 39 alt="Story Permalink" title="Story Permalink" /></a>
bgneal@24 40 {% if user.is_authenticated %}
bgneal@312 41 <a href="{% url 'news.views.email_story' story.id %}"><img src="{{ STATIC_URL }}icons/email_go.png"
bgneal@24 42 alt="Send this story to a friend" title="Send this story to a friend" /></a>
bgneal@24 43 {% endif %}
bgneal@24 44 </p>
bgneal@205 45 {% tags_for_object story as story_tags %}
bgneal@205 46 {% if story_tags %}
gremmie@1 47 <div class="news-tags">
bgneal@312 48 <img src="{{ STATIC_URL }}icons/tag_blue.png" alt="Tags" title="Tags" /> Tags:
gremmie@1 49 <ul>
gremmie@1 50 {% for tag in story_tags %}
bgneal@310 51 <li><a href="{% url 'news-tag_page' tag_name=tag.name %}">{{ tag.name }}</a></li>
gremmie@1 52 {% endfor %}
gremmie@1 53 </ul>
gremmie@1 54 </div>
gremmie@1 55 {% endif %}
bgneal@484 56 {% social_sharing story.title story.get_absolute_url %}
gremmie@1 57 </div>
gremmie@1 58 {% get_comment_count for story as comment_count %}
gremmie@1 59 <p>This story has <span id="comment-count">{{ comment_count }}</span> comment{{ comment_count|pluralize }}.</p>
gremmie@1 60 <hr />
gremmie@1 61 {% render_comment_list story %}
gremmie@1 62 {% if story.can_comment_on %}
gremmie@1 63 <p>Leave a comment?</p>
gremmie@1 64 {% render_comment_form for story %}
gremmie@1 65 {% else %}
gremmie@1 66 <p>Comments are closed for this story. If you'd like to share your thoughts on this story
bgneal@310 67 with the site staff, you can <a href="{% url 'contact-form' %}">contact us directly</a>.</p>
gremmie@1 68 {% endif %}
bgneal@380 69 </div>
gremmie@1 70 {% endblock %}
bgneal@490 71 {% block end_body %}{% include 'core/social_sharing_end.html' %}{% endblock %}