annotate gpp/templates/potd/view.html @ 481:9f888dbe61ce

Fixing #230; add a scrollbar to the PM popup dialog if necessary. This wasn't as easy as I thought. Had to wrap the PM text in a div with its styling (max-height and overflow). If I then resized the dialog, I'd get two scrollbars. So for now, made the dialog non-resizable.
author Brian Neal <bgneal@gmail.com>
date Fri, 07 Oct 2011 02:11:33 +0000
parents 88b2b9cb8c1f
children 7dbdbb08e68c
rev   line source
gremmie@1 1 {% extends 'base.html' %}
bgneal@310 2 {% load url from future %}
gremmie@1 3 {% load comment_tags %}
bgneal@6 4 {% load script_tags %}
gremmie@1 5 {% block title %}Photo Of The Day{% endblock %}
gremmie@1 6 {% block custom_css %}
bgneal@312 7 <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/potd.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@127 11 {% script_tags "markitup jquery-ui" %}
bgneal@312 12 <script type="text/javascript" src="{{ STATIC_URL }}js/comments.js"></script>
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 %}
gremmie@1 22 <div class="potd-details">
gremmie@1 23 <img src="{{ potd.photo.url }}" alt="{{ potd.caption }}" title="{{ potd.caption }}" />
gremmie@1 24 <p class="caption">{{ potd.caption }}</p>
gremmie@1 25 <p class="details">
gremmie@1 26 Submitted by
bgneal@310 27 <a href="{% url 'bio-view_profile' username=potd.user.username %}">{{ potd.user.username }}</a>
gremmie@1 28 on {{ potd.date_added|date:"d F Y" }}.<br />
gremmie@1 29 This photo has been Photo of the Day {{ potd.potd_count }} time{{ potd.potd_count|pluralize }}.
gremmie@1 30 </p>
bgneal@267 31 <p class="description">{{ potd.description|safe }}</p>
gremmie@1 32 <p class="details">
gremmie@1 33 If you would like us to feature your photo, send it along with your username, a title, and
gremmie@1 34 short description to <a href="mailto:admin@surfguitar101.com">admin@surfguitar101.com</a>.
gremmie@1 35 </p>
gremmie@1 36 {% get_comment_count for potd as comment_count %}
gremmie@1 37 <p>This photo has <span id="comment-count">{{ comment_count }}</span> comment{{ comment_count|pluralize }}.</p>
gremmie@1 38 <hr />
gremmie@1 39 </div>
gremmie@1 40 {% render_comment_list potd %}
gremmie@1 41 {% if potd.can_comment_on %}
gremmie@1 42 <p>Leave a comment?</p>
gremmie@1 43 {% render_comment_form for potd %}
bgneal@6 44 <br />
gremmie@1 45 {% else %}
gremmie@1 46 <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 47 with the site staff, you can <a href="{% url 'contact-form' %}">contact us directly</a>.</p>
gremmie@1 48 {% endif %}
gremmie@1 49 {% else %}
gremmie@1 50 <p>We're sorry, there doesn't seem to be a photo of the day right now.</p>
gremmie@1 51 {% endif %}
gremmie@1 52 {% endblock %}