{% load base_tags %}
{% load base_filters %}
{% load i18n %}


<div class="meta">
    <div class="meta-left">
        <div class="submitted"><strong>{% trans "Released:" %}</strong> {{ news.release_dt|date:"long" }}
        </div>
        
        {% if news.source %}
            <div class="submitted"><strong>{% trans "Source:" %}</strong> {{ news.source|urlize }}</div>
        {% endif %}
        
        {% if news.first_name or news.last_name or news.phone or news.fax or news.email or news.website %} 
        <div class="contact">
            {% if news.first_name or news.last_name %}
                <div><strong>{% trans "Contact:" %}</strong> {{ news.first_name }} {{ news.last_name }}</div>
            {% endif %}	
            {% if news.phone %}
                <div><strong>{% trans "Phone:" %}</strong> {{ news.phone|phonenumber }}</div>	
            {% endif %}	
            {% if news.fax %}
                <div><strong>{% trans "Fax:" %}</strong> {{ news.fax }}</div>	
            {% endif %}	
            {% if news.email %}
            <div><strong>{% trans "Email:" %}</strong>{{ news.email|obfuscate_email }}</div>
            {% endif %}
            {% if news.website %}	
            <div><strong>{% trans "Website:" %}</strong>{{ news.website|urlize }}</div>	
            {% endif %}
        </div> 
        {% endif %}
        
        {% with news.category_set as news_cat %}
        {% if news_cat %}
        <div class="categories">
            <strong>{% trans "Category:" %} </strong><a href="{% url news %}?q=category:{{ news_cat.category }}">{{ news_cat.category }}</a>
        {% if news_cat.sub_category %}
            | <strong>{% trans "Sub Category:" %} </strong><a href="{% url news %}?q=sub_category:{{ news_cat.sub_category }}">{{ news_cat.sub_category }}</a>
        {% endif %}	
        </div>
        {% endif %}
        {% endwith %}

        {% if news.tags %}
        <div class="tags"><strong>{% trans "Tags:" %} </strong>
            {% for tag in news.tags|tag_split %}
                <a href="{% url news %}?q=tag:{{ tag|lower }}">{{ tag }}</a>{% if not forloop.last %}, {% endif %}
            {% endfor %}
        </div>
        {% endif %}
    </div>
    <div class="meta-right">
        {% if news.slug %}<a class="print-link" href="{% url news.print_view news.slug %}">Print</a>{% endif %}
    </div>
</div>
{% if user.profile.is_superuser %}
<div class="editor-bar">

    <div class="perm-status">
    <ul>
        <li>{{ news.obj_perms }}</li>
        <li>{{ news.obj_status }}</li>
    </ul>
    </div>
    <div class="edit-links">
    <ul>
        <li><a class="eventlog-link" href="{% url event_log.search %}?object_id={{ news.pk }}&source={{ news.opt_app_label }}">{% trans "Eventlogs" %}</a></li>
        <li><a class="edit-link" href="{% url news.edit news.pk %}">{% trans "Edit" %}</a></li>
        <li><a class="options-link" href="#">{% trans "Options" %} <small>&#9650;</small></a>
        <div class="options-list">
            <ul>
            <li>
                <a class="delete" href="{% url news.delete news.pk %}">{% trans "Delete" %}</a>
            </li>				
                <li><a href="{% url news.edit.meta news.pk %}">{% trans "Edit Meta" %}</a></li>
                <li><a href="{% url category.update news.opt_app_label news.opt_module_name news.pk %}">{% trans "Edit Categories" %}</a></li>
                
            </ul>
        </div>
        </li>
    </ul>
    </div>
</div> 
{% endif %}
