
{% extends "newsroom/base.html" %}

{% block og_title %}{{archive.title}}{% endblock %}
{% block og_type %}Article{% endblock %}
{% block og_url %}{{archive.get_absolute_url}}{% endblock %}
{% block og_description %}{{archive.description}}{% endblock %}
{% block og_image %}{% if archive.lead_image %}{{MEDIA_URL}}{{archive.lead_image}}{% else %}{{MEDIA_URL}}images/headers/pbp_sharing_logo.jpg{% endif %}{% endblock %}

{% block title %}{{archive.title}} | Community News Archives | Penobscot Bay Press{% endblock %}
{% block description %}{{archive.body|truncatewords:60}} {% endblock %}
{% block flag_img_src %}{{MEDIA_URL}}images/headers/archivesround440.gif{% endblock %}
{% block flag_descrip %}Short-term archives, videos, slideshows and special features {% endblock %}
{% block content %}
{% load markup typogrify humanize %}
<td colspan="2" valign="top" bgcolor="white" width="565"> 
    <div style="padding-left:12px; padding-right:12px; padding-top:12px"> 
        <h1 align="center"><em>{{ archive.paper }}</em> Archives<br> 
            <a class="return" href="{% url nr-archive-index %}">Return to  Archives &amp; Multimedia</a><br> 
                          <br> 
                  </SPAN><SPAN Class="dirservheader">
                  {% if archive.lead_image %}
                  <img src="{{archive.lead_image.url}}" alt="{{archive}}"/></span></h1>
                  {% else %} 
                  {{archive.title}}</SPAN></h1> 
                  {% endif %}
                  <SPAN Class="teaser">{{archive.dateline}}</SPAN><br>
                  </SPAN><SPAN Class="headline">{{archive|cut:"archive"}}</SPAN>
                  {{archive.description|markdown|typogrify}}

        {% if archive.pdf_documents.all %}
        <p><span class="dirservfeatured">Documents</span></p> 
        <ol> 
            {% for doc in archive.pdf_documents.all|dictsortreversed:"published_on" %}
            <li><a href="{{doc.get_absolute_url}}" class="archive">{{doc.title}}</a><br>
            <span class="paper"> {% for e in doc.webedition_set.all %}{% if forloop.first %}<em>{{e.paper}}</em>, {{e.published_on|date:"n/j/y"}}{% endif %}{% endfor %}</span>

            </li> 
            {% endfor %}
        </ol>
        {% endif %}

        {% if archive.movies.all %}
        <p><span class="dirservfeatured">Movies</span></p> 
        <ol> 
            {% for movie in archive.movies.all %}
            <li><a href="{{movie.get_absolute_url}}" class="archive">{{movie.title}}</a></li> 
            {% endfor %}
        </ol>

        {% endif %}

        {% if archive.slideshows.all %}
        <p><span class="dirservfeatured">Slideshows</span></p> 
        <ol> 
            {% for ss in archive.slideshows.all %}
            <li><a href="{{ss.get_absolute_url}}" class="archive">{{ss.title}}</a></li> 
            {% endfor %}
        </ol>
        {% endif %}

        {% if archive.galleries.all %}
        <p><span class="dirservfeatured">Galleries</span></p> 
        <ol> 
            {% for gallery in archive.galleries.all %}
            <li><a href="{{gallery.get_absolute_url}}" class="archive">{{gallery.title}}</a></li> 
            {% endfor %}
        </ol>
        {% endif %}

        {% if archive.stories.all %}
        {% if archive.group_by == 'type' %}
        <p><span class="dirservfeatured">Articles</span></p> 
        <ol> 
            {% for article in archive.stories.all|dictsortreversed:"published_on" %}
            <li><a href="{{article.site.domain}}{{article.get_absolute_url}}" class="archive">{{article.hed}}</a><br />
			<span class="paper">{% for e in article.paper_editions.all %}{% if forloop.first %}<em>{{e.paper}}</em>, {{e.published_on|date:"n/j/y"}}{% endif %}{% endfor %}</span>
			</li> 
            {% endfor %}
        </ol>
        {% else %}
        {% if archive.group_by == 'dline' %}
        {% regroup archive.stories.all|dictsort:"dateline.title" by dateline as dateline_list %}
        <p><span class="archivesection">Articles</span></p> 
        {% for dline in dateline_list %}
        <p><span class="teaser">{{dline.grouper}}</span></p>
        <ol>
            {% for article in dline.list|dictsortreversed:"published_on" %}
            <li><a href="{{article.site.domain}}{{article.get_absolute_url}}" class="archive">{{article.hed}}</a><br />
			<span class="paper">{% for e in article.webedition_set.all %}{% if forloop.first %}<em>{{e.paper}}</em>, {{e.published_on|date:"n/j/y"}}{% endif %}{% endfor %}</span>
			</li> 
            {% endfor %}
        </ol>
        {% endfor %} 
        {% else %}
        {% endif %}
        {% endif %}
        {% endif %}

        {% if archive.editorials.all %}
        {% if archive.group_by == 'type' %}
        <p><span class="dirservfeatured">Opinion</span></p> 
        <ol> 
            {% for opinion in archive.editorials.all %}
            <li><a href="{{opinion.get_absolute_url}}" class="archive">{{opinion.hed}}</a><br />
            <span class="paper"> {% for e in opinion.webedition_set.all %}{% if forloop.first %}<em>{{e.paper}}</em>, {{e.published_on|date:"n/j/y"}}{% endif %}{% endfor %}</span>
            {% endfor %}
        </ol> 
        {% else %}
        {% if archive.group_by == 'dline' %}
        {% regroup archive.editorials.all|dictsort:"dateline.title" by dateline as dateline_list %}
        <p><span class="archivesection">Opinion</span></p> 
        {% for dline in dateline_list %}
        <p><span class="teaser">{{dline.grouper}}</span></p>
        <ol> 
            {% for opinion in dline.list|dictsortreversed:"published_on" %}
            <li><a href="{{opinion.get_absolute_url}}" class="archive">{{opinion.hed}}</a><br />
            <span class="paper"> {% for e in opinion.webedition_set.all %}{% if forloop.first %}<em>{{e.paper}}</em>, {{e.published_on|date:"n/j/y"}}{% endif %}{% endfor %}</span>
            {% endfor %}
        </ol> 
        {% endfor %}
        {% endif %}
        {% endif %}
        {% endif %}
    </div> 
<div style="padding-left:12px; padding-right:12px; clear:both">
<!-- AddThis Button BEGIN -->
<div style="text-align:left; clear:both"><hr size="1">
<p><span class="kicker"><strong>Share this page</strong></span>
<div>
<a class="addthis_button_facebook_like" fb:like:layout="standard"></a>
</div><br>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style">
<a class="addthis_button_twitter" tw:count="none"></a> &nbsp;
<a class="addthis_button_email"></a> &nbsp;
<a class="addthis_button_print"></a> &nbsp;
<a class="addthis_button_pinterest_share" style="cursor:pointer"></a> &nbsp;
<a class="addthis_button_reddit"></a> &nbsp;
<a class="addthis_button_gmail"></a> &nbsp;
<a class="addthis_button_tumblr"></a> &nbsp;
<a class="addthis_button_compact"></a>
</div>
<script type="text/javascript">var addthis_config = {"data_track_addressbar":true};</script>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=penbaypress"></script>
<hr size="1"></div>
<!-- AddThis Button END -->
<p><a class="return" href="{%url nr-index %}">Return to the Community News home page.</a></p> 

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