annotate sg101/templates/potd/view.html @ 1139:bb82177cc236

Issue #92 missing javascript for new post box.
author Brian Neal <bgneal@gmail.com>
date Thu, 27 Oct 2016 19:47:20 -0500
parents 7fd997285c9e
children
rev   line source
bgneal@1107 1 {% extends 'v3/base.html' %}
bgneal@1018 2 {% load static from staticfiles %}
bgneal@492 3 {% load bio_tags %}
bgneal@491 4 {% load core_tags %}
gremmie@1 5 {% load comment_tags %}
bgneal@6 6 {% load script_tags %}
gremmie@1 7 {% block title %}Photo Of The Day{% endblock %}
bgneal@491 8 {% block custom_meta %}
bgneal@491 9 {% open_graph_meta_tags potd %}
bgneal@491 10 {% endblock %}
gremmie@1 11 {% block custom_css %}
bgneal@1018 12 <link rel="stylesheet" type="text/css" href="{% static "css/comments.css" %}" />
gremmie@1 13 {% endblock %}
gremmie@1 14 {% block content %}
bgneal@14 15 {% if is_current %}
gremmie@1 16 <h2>Photo Of The Day</h2>
gremmie@1 17 <h3>{% now "l, F d, Y" %}</h3>
bgneal@14 18 {% else %}
bgneal@14 19 <h2>Photo Of The Day Archives</h2>
bgneal@14 20 {% endif %}
bgneal@53 21 {% if potd %}
bgneal@1107 22 <div class="row">
bgneal@1107 23 <div class="columns">
bgneal@1107 24 <div class="text-center">
bgneal@1107 25 <img src="{{ potd.photo.url }}" alt="{{ potd.caption }}" title="{{ potd.caption }}" />
bgneal@1107 26 </div>
bgneal@1107 27 </div>
bgneal@1107 28 </div>
bgneal@1107 29 <div class="row">
bgneal@1107 30 <div class="columns">
bgneal@1107 31 <div class="text-center">
bgneal@1107 32 <p><strong>{{ potd.caption }}</strong></p>
bgneal@1107 33 <p class="quiet">
bgneal@1107 34 <em>
bgneal@1107 35 Submitted by
bgneal@1107 36 {% profile_link potd.user.username %} on {{ potd.date_added|date:"d F Y" }}.<br />
bgneal@1107 37 This photo has been Photo of the Day {{ potd.potd_count }} time{{ potd.potd_count|pluralize }}.
bgneal@1107 38 </em>
bgneal@1107 39 </p>
bgneal@1107 40 </div>
bgneal@1107 41 </div>
bgneal@1107 42 </div>
bgneal@1107 43 <div class="row">
bgneal@1107 44 <div class="columns">
bgneal@1108 45 <div class="text-center">{{ potd.description|safe }}</div>
bgneal@1107 46 </div>
bgneal@1107 47 </div>
bgneal@1107 48 <div class="row">
bgneal@1107 49 <div class="columns">
bgneal@1107 50 <div class="text-center quiet">
bgneal@1107 51 <p>
bgneal@1107 52 If you would like us to feature your photo, send it along with your username, a title, and
bgneal@1107 53 short description to <a href="mailto:admin@surfguitar101.com">admin@surfguitar101.com</a>.
bgneal@1107 54 </p>
bgneal@1107 55 </div>
bgneal@1107 56 </div>
bgneal@1107 57 </div>
bgneal@1107 58 {% social_sharing potd.caption potd.get_absolute_url center=True %}
gremmie@1 59 {% get_comment_count for potd as comment_count %}
bgneal@1107 60 <div class="row">
bgneal@1107 61 <div class="columns">
bgneal@1107 62 <div class="text-center quiet">
bgneal@1107 63 <em>
bgneal@1107 64 This photo has <span id="comment-count">{{ comment_count }}</span> comment{{ comment_count|pluralize }}.
bgneal@1107 65 </em>
bgneal@1107 66 </div>
bgneal@1107 67 </div>
bgneal@1107 68 </div>
bgneal@1107 69
gremmie@1 70 <hr />
bgneal@1107 71
gremmie@1 72 {% render_comment_list potd %}
bgneal@1107 73 <br>
gremmie@1 74 {% if potd.can_comment_on %}
gremmie@1 75 <p>Leave a comment?</p>
bgneal@1107 76 {% render_comment_form_v3 user potd %}
gremmie@1 77 {% else %}
gremmie@1 78 <p>Comments are allowed only on today's photo of the day. If you'd like to share your thoughts on this photo
bgneal@310 79 with the site staff, you can <a href="{% url 'contact-form' %}">contact us directly</a>.</p>
gremmie@1 80 {% endif %}
gremmie@1 81 {% else %}
gremmie@1 82 <p>We're sorry, there doesn't seem to be a photo of the day right now.</p>
gremmie@1 83 {% endif %}
gremmie@1 84 {% endblock %}
bgneal@1107 85 {% block custom_js %}
bgneal@1107 86 <script src="{% static "js/comments.js" %}"></script>
bgneal@1139 87 <script src="{% static "js/jquery.form.min.js" %}"></script>
bgneal@1107 88 <script src="{% static "js/v3/post_box.js" %}"></script>
bgneal@1107 89 {% endblock %}