annotate gpp/templates/potd/view.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 88b2b9cb8c1f
children 3c48a555298d
rev   line source
gremmie@1 1 {% extends 'base.html' %}
bgneal@310 2 {% load url from future %}
bgneal@491 3 {% load core_tags %}
gremmie@1 4 {% load comment_tags %}
bgneal@6 5 {% load script_tags %}
gremmie@1 6 {% block title %}Photo Of The Day{% endblock %}
bgneal@491 7 {% block custom_meta %}
bgneal@491 8 {% open_graph_meta_tags potd %}
bgneal@491 9 {% endblock %}
gremmie@1 10 {% block custom_css %}
bgneal@312 11 <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/potd.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@127 15 {% script_tags "markitup jquery-ui" %}
bgneal@312 16 <script type="text/javascript" src="{{ STATIC_URL }}js/comments.js"></script>
gremmie@1 17 {% endblock %}
bgneal@491 18 {% block begin_body %}{% include 'core/social_sharing_begin.html' %}{% endblock %}
gremmie@1 19 {% block content %}
bgneal@14 20 {% if is_current %}
gremmie@1 21 <h2>Photo Of The Day</h2>
gremmie@1 22 <h3>{% now "l, F d, Y" %}</h3>
bgneal@14 23 {% else %}
bgneal@14 24 <h2>Photo Of The Day Archives</h2>
bgneal@14 25 {% endif %}
bgneal@53 26 {% if potd %}
gremmie@1 27 <div class="potd-details">
gremmie@1 28 <img src="{{ potd.photo.url }}" alt="{{ potd.caption }}" title="{{ potd.caption }}" />
gremmie@1 29 <p class="caption">{{ potd.caption }}</p>
gremmie@1 30 <p class="details">
gremmie@1 31 Submitted by
bgneal@310 32 <a href="{% url 'bio-view_profile' username=potd.user.username %}">{{ potd.user.username }}</a>
gremmie@1 33 on {{ potd.date_added|date:"d F Y" }}.<br />
gremmie@1 34 This photo has been Photo of the Day {{ potd.potd_count }} time{{ potd.potd_count|pluralize }}.
gremmie@1 35 </p>
bgneal@491 36 <div class="description">{{ potd.description|safe }}</div>
gremmie@1 37 <p class="details">
gremmie@1 38 If you would like us to feature your photo, send it along with your username, a title, and
gremmie@1 39 short description to <a href="mailto:admin@surfguitar101.com">admin@surfguitar101.com</a>.
gremmie@1 40 </p>
bgneal@491 41 {% social_sharing potd.caption potd.get_absolute_url %}
gremmie@1 42 {% get_comment_count for potd as comment_count %}
gremmie@1 43 <p>This photo has <span id="comment-count">{{ comment_count }}</span> comment{{ comment_count|pluralize }}.</p>
gremmie@1 44 <hr />
gremmie@1 45 </div>
gremmie@1 46 {% render_comment_list potd %}
gremmie@1 47 {% if potd.can_comment_on %}
gremmie@1 48 <p>Leave a comment?</p>
gremmie@1 49 {% render_comment_form for potd %}
bgneal@6 50 <br />
gremmie@1 51 {% else %}
gremmie@1 52 <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 53 with the site staff, you can <a href="{% url 'contact-form' %}">contact us directly</a>.</p>
gremmie@1 54 {% endif %}
gremmie@1 55 {% else %}
gremmie@1 56 <p>We're sorry, there doesn't seem to be a photo of the day right now.</p>
gremmie@1 57 {% endif %}
gremmie@1 58 {% endblock %}
bgneal@491 59 {% block end_body %}{% include 'core/social_sharing_end.html' %}{% endblock %}