{% extends "base.html" %}
{% block meta_keywords %}{% for tag in object.story.tags.all %}{{tag}}, {%endfor %}{% endblock %}
{% block meta_title %}{{object.story.web_hed}} {% for e in object.story.edition_set.all %}{%if forloop.first %}{% if e.paper == "Compass" %}| {{e.paper}}{%endif%}{%endif%}{%endfor%}  | Penobscot Bay Press{% endblock %}
{% block meta_description %}{{object.story.summary}}{% endblock %}
{% if object.story.lead_photo %}
{% block rel-img %}{{object.story.lead_photo.get_square_url}}{% endblock %}
{% endif %}

{% block title %}{{object.story.web_hed}} | {% for e in object.story.edition_set.all %}{% if forloop.first %}{{e.paper}}{%endif%}{%endfor%} | Penobscot Bay Press {% endblock %}

{% block content %}
{% load markup typogrify humanize %}
<td valign="top" bgcolor="white" width="565" colspan="2">
  <div style="padding-left:12px; padding-right:12px; padding-top:12px">
  <img src="{{object.group.graphic.url}}" alt="{{object.group}}" height="60" width="468" border="0"><br>
  <h1>{{object.group|upper}}</h1>
  <p><a href="{{object.group.get_absolute_url}}" alt="{{object.group}}">Return to the {{object.group}} historical archive</a></p>
      <p><SPAN Class="teaser">{{object.story.dateline}}</SPAN><br />
      <span class="paper">{% for e in object.story.edition_set.all %}{% if forloop.first %}<em>{{e.paper}}</em>, {{object.story.published_on|date:"F j, Y"}}{% endif %}{% endfor %}</span><br/>
    <SPAN Class="headline">{{object.story.web_hed|typogrify}}</SPAN>
    </p>

  {% if object.story.lead_photo or object.story.attached_documents.all %}
  <div style="float:right; width:250px; padding-left:25px">
  {% endif %} 


  {% if object.story.lead_photo %}
	<p>{% if object.story.lead_photo.gallery_photos.all %}
	{% for gallery in object.story.lead_photo.gallery_photos.all %}
	{% if forloop.first %}<a href="{{gallery.get_absolute_url}}" alt="{{object.story.lead_photo.title}}" class="cutline">{% endif %}
	{% endfor %}
	{% else %}
	<a href="{{object.story.lead_photo.get_absolute_url}}" alt="{{object.story.lead_photo.title}}" class="cutline">
	{% endif %}
        <img src="{{object.story.lead_photo.get_square_url}}" alt="{{object.story.lead_photo.title}}" width="250" border="0"><br>
        {{object.story.lead_photo.description|urlize|textile|typogrify}}</a>
	{% if object.story.lead_photo.photographer %}
	By {{object.story.lead_photo.photographer}}<br/>
	{% else %}
	{% if object.story.lead_photo.courtesy %}
	Photo courtesy {{object.story.lead_photo.courtesy}}<br/>
	{% endif %}
	{% if object.story.lead_photo.file_photo %}
	Penobscot Bay Press file photo<br/>
	{% endif %}
	{% endif %}
  </p>
  {% if object.story.attached_gallery.all %}
  {% for rel_gallery in object.story.attached_gallery.all %}
  <a class="gallery_link" href="{{rel_gallery.gallery.get_absolute_url}}" alt="{{rel_gallery}}">View the gallery of photos</a><br>
  {% for photo in rel_gallery.gallery.photos.all %}
  {% ifnotequal photo object.story.lead_photo %}
      <p><a class="cutline" href="{{rel_agllery.gallery.get_absolute_url}}" alt="{{photo.title}}" class="cutline"><img src="{{photo.get_square_url}}" alt="{{photo.title}}" width="250" border="0"><br>
          {{photo.description|urlize|textile|typogrify}}</a>
	{% if photo.photographer != None %}
	By {{photo.photographer}}<br/>
	{% endif %}
	{% if photo.courtesy %}
	Photo courtesy {{photo.courtesy}}<br/>
	{% endif %}
	{% if photo.file_photo %}
	Penobscot Bay Press file photo<br/>
	{% endif %}
    </p>
  {% endifnotequal %}
  {% endfor %}
  {% endfor %}
  {% endif %}
  {% endif %}

  {% if object.story.attached_documents.all %}
  <h3>Documents</h3>
  {% for doc in object.story.attached_documents.all %}
  <a href="{{doc.document.get_absolute_url}}" alt="{{doc.document}}">
  <img src="{{doc.document.preview.path}}" alt="{{doc.document}}">
  {{doc.document.description}}
  {% endfor %}
  {% endif %}

  {% if object.story.lead_photo or object.story.attached_document.all %}
    </div>
  {% endif %}
  </div>

  <div style="padding-left:12px; padding-right:12px">
      <p style="">{% if object.story.authors.all %}<span style="float:left">by {% for author in object.story.authors.all %}{{ author.name }}{% if not forloop.last %}&{% endif %}{% endfor %}</span><br/>{% endif %}
    {{object.story.body|urlize|markdown|typogrify}} 
    
    </p>
    <p><em>This Remember When was brought to you by:</em></p>
    <p><a href="{{object.advert.get_absolute_url}}" alt="{{object.advert}}"><img src="{{object.advert.content.url}}" alt="{{object.advert}}"></a></p>
    <p><span class="kicker"><strong>Share this page</strong></span>
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style ">
<a href="http://www.addthis.com/bookmark.php?v=250&amp;username=penbaypress" class="addthis_button_compact">Share</a>
<span class="addthis_separator">|</span>
<a class="addthis_button_facebook_like" />
<a class="addthis_button_twitter"></a>
<a class="addthis_button_email"></a>
<a class="addthis_button_print"></a>
<a class="addthis_button_googlebuzz"></a>
</div>
<script type="text/javascript">var addthis_config = {"data_track_clickback":true};</script>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=penbaypress"></script>
<!-- AddThis Button END -->
</p>
    <p><a class="return" href="{% url nr-index %}">Return to the Penobscot Bay Press home page.</a></p>
    <hr size="1">
  </div>
</td>

<tr> </tr>
{% endblock %}

