{% load i18n %}

{% if articles %}
    <h3 style="font-size: 24px; font-family: Helvetica, Arial, sans-serif; margin: 0px;">
    {# named area for jump links #}
    <a name="articles" id="articles"></a>
    {% if start_dt %}
        {% blocktrans with start_dt|date:"M d, Y" as start_date and end_dt|date:"M d, Y" as end_date %}Articles for {{ start_date }} to {{ end_date }}{% endblocktrans %}
    {% else %}
        {% blocktrans %}All Articles{% endblocktrans %}
    {% endif %}
    </h3>

    {% for article in articles %}

        {# leverage the functions in the object #}

        <table width="100%"  border="0" cellpadding="0" cellspacing="0" class="body_copy">
        <tr><td>&nbsp;</td></tr>
        <tr><td align="left" valign="top">
        <a href="{{ SITE_GLOBAL_SITEURL }}{% url article article.slug %}" >
        <font face="Arial" size="2"><b> {{article.headline}}
        </b></font></a>

        {# show member icon if not allowanonymousview/allowsiteuserview #}
        {% if not article.allow_anonymous_view and article.allow_user_view   %}
            &nbsp;&nbsp;<img src="{{ SITE_GLOBAL_SITEURL }}/static/images/icons/member.gif" height="13" width="15" 
            border="0" alt="Member View Only" title="Member View Only">
        {% endif %}
        </td></tr>

        {% if not simplified  %}
            <tr><td align="left" valign="top"><font face="Arial" size="2" color="#000000">
            <b>{% trans "Author:" %}</b> {{ article.first_name }} {{ article.last_name }} </font></td></tr>

            <tr><td align="left"><font face="Arial" size="2" color="#000000">
            <b>{% trans "Release Date:" %}</b> {{ article.release_dt|date:"l d-M-Y h:i A" }} </font> 
            </td></tr>
        {% endif %}

        <tr><td align="left" valign="top"><div>
        <font face="Arial" size="2" color="#000000">

        {{ article.body|striptags|truncatewords:60 }}
         <a href="{{ SITE_GLOBAL_SITEURL }}{% url article article.slug %}">[{% trans "More Info" %}]</a>
        </font>

        {#  posted by #}
        {% if not simplified  %}
            <font face="Arial" size="2" color="#000000">
            <br>{% blocktrans with article.owner.first_name as article_first and article.owner.last_name as article_last %}<b>Posted by</b>: 
            {{ article_first }} {{ article_last }}{% endblocktrans %}
            </font>
        {% endif %}
        <br>

        </div></td></tr>
        </table>

    {% endfor %}
    <hr>
{% endif %}
