view gpp/templates/potd/view.html @ 565:6a265b5768ca

For bitbucket issue #5, rework the duplicate email checking in the registration form logic. Added tests for registration.
author Brian Neal <bgneal@gmail.com>
date Sun, 04 Mar 2012 13:20:40 -0600
parents 3c48a555298d
children
line wrap: on
line source
{% extends 'base.html' %}
{% load url from future %}
{% load bio_tags %}
{% load core_tags %}
{% load comment_tags %}
{% load script_tags %}
{% block title %}Photo Of The Day{% endblock %}
{% block custom_meta %}
{% open_graph_meta_tags potd %}
{% endblock %}
{% block custom_css %}
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/potd.css" />
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/comments.css" />
{% endblock %}
{% block custom_js %}
{% script_tags "markitup jquery-ui" %}
<script type="text/javascript" src="{{ STATIC_URL }}js/comments.js"></script>
{% endblock %}
{% block begin_body %}{% include 'core/social_sharing_begin.html' %}{% endblock %}
{% block content %}
{% if is_current %}
<h2>Photo Of The Day</h2>
<h3>{% now "l, F d, Y" %}</h3>
{% else %}
<h2>Photo Of The Day Archives</h2>
{% endif %}
{% if potd %}
<div class="potd-details">
<img src="{{ potd.photo.url }}" alt="{{ potd.caption }}" title="{{ potd.caption }}" />
<p class="caption">{{ potd.caption }}</p>
<p class="details">
Submitted by 
{% profile_link potd.user.username %} on {{ potd.date_added|date:"d F Y" }}.<br />
This photo has been Photo of the Day {{ potd.potd_count }} time{{ potd.potd_count|pluralize }}.
</p>
<div class="description">{{ potd.description|safe }}</div>
<p class="details">
If you would like us to feature your photo, send it along with your username, a title, and 
short description to <a href="mailto:admin@surfguitar101.com">admin@surfguitar101.com</a>.
</p>
{% social_sharing potd.caption potd.get_absolute_url %}
{% get_comment_count for potd as comment_count %}
<p>This photo has <span id="comment-count">{{ comment_count }}</span> comment{{ comment_count|pluralize }}.</p>
<hr />
</div>
{% render_comment_list potd %}
{% if potd.can_comment_on %}
<p>Leave a comment?</p>
{% render_comment_form for potd %}
<br />
{% else %}
<p>Comments are allowed only on today's photo of the day. If you'd like to share your thoughts on this photo 
with the site staff, you can <a href="{% url 'contact-form' %}">contact us directly</a>.</p>
{% endif %}
{% else %}
<p>We're sorry, there doesn't seem to be a photo of the day right now.</p>
{% endif %}
{% endblock %}
{% block end_body %}{% include 'core/social_sharing_end.html' %}{% endblock %}