Mercurial > public > sg101
view sg101/templates/news/story.html @ 1031:e1c03da72818
Get rid of some warnings in Django 1.8.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 20 Dec 2015 22:18:59 -0600 |
parents | 02ae9a4a846a |
children | e932f2ecd4a7 |
line wrap: on
line source
{% extends 'news/base.html' %} {% load tagging_tags %} {% load bio_tags %} {% load comment_tags %} {% load script_tags %} {% load static from staticfiles %} {% load core_tags %} {% block title %}News: {{ story.title }}{% endblock %} {% block custom_meta %} {% open_graph_meta_tags story %} {% endblock %} {% block news_css %} <link rel="stylesheet" type="text/css" href="{% static "css/comments.css" %}" /> {% endblock %} {% block custom_js %} {% if story.can_comment_on %} {% script_tags "markitup jquery-ui" %} <script type="text/javascript" src="{% static "js/comments.js" %}"></script> {% endif %} {% endblock %} {% block news_content %} <div class="solid-background"> <h3>{{ story.title }}</h3> <div class="news-details"> Submitted by {% profile_link story.submitter.username %} on {{ story.date_submitted|date:"F d, Y" }}. </div> <hr /> <div class="news-content"> <a href="{% url 'news-category' slug=story.category.slug %}"> <img src="{{ story.category.icon.url }}" alt="{{ story.category.title }}" title="{{ story.category.title }}" class="news-icon" /></a> {{ story.short_text|safe }} {{ story.long_text|safe }} {{ story.admin_content|safe }} <br clear="all" /> <hr /> <p> Category: <a href="{% url 'news-category' slug=story.category.slug %}">{{ story.category.title }}</a> <a href="{{ story.get_absolute_url }}"><img src="{% static "icons/link.png" %}" alt="Story Permalink" title="Story Permalink" /></a> {% if user.is_authenticated %} <a href="{% url 'news-email_story' story.id %}"><img src="{% static "icons/email_go.png" %}" alt="Send this story to a friend" title="Send this story to a friend" /></a> {% endif %} </p> {% tags_for_object story as story_tags %} {% if story_tags %} <div class="news-tags"> <img src="{% static "icons/tag_blue.png" %}" alt="Tags" title="Tags" /> Tags: <ul> {% for tag in story_tags %} <li><a href="{% url 'news-tag_page' tag_name=tag.name %}">{{ tag.name }}</a></li> {% endfor %} </ul> </div> {% endif %} {% social_sharing story.title story.get_absolute_url %} </div> {% if story.version == 0 %} {% get_comment_count for story as comment_count %} <p>This story has <span id="comment-count">{{ comment_count }}</span> comment{{ comment_count|pluralize }}.</p> <hr /> {% render_comment_list story %} {% if story.can_comment_on %} <p>Leave a comment?</p> {% render_comment_form for story %} {% else %} <p>Comments are closed for this story. If you'd like to share your thoughts on this story with the site staff, you can <a href="{% url 'contact-form' %}">contact us directly</a>.</p> {% endif %} {% else %} {% if story.forums_topic %} <a href="{{ story.forums_topic.get_absolute_url }}">{{ story.forums_comment_count }} comment{{ story.forums_comment_count|pluralize }}</a> {% else %} <p><em>Comments are disabled.</em></p> {% endif %} {% endif %} </div> {% endblock %}