{% load i18n staticfiles thumbnail apphooks_config_tags %}

<div class="aldryn-dashboards_app-meta">
    {% if author and author.slug %}
        <div class="image pull-left">
            <a href="{% namespace_url "dashboard-list-by-author" author.slug namespace=namespace default='' %}">
                {% if author.visual %}
                    {% thumbnail author.visual "50x50" crop upscale subject_location=author.visual.subject_location as author_image %}
                    <img src="{{ author_image.url }}" width="50" height="50" alt="{{ author }}">
                {% else %}
                    <img src="{% static "img/dashboards_app/no-photo.png" %}" height="50" width="50" alt="{{ author }}">
                {% endif %}
            </a>
        </div>
        <div class="meta">
            <p class="author"><a href="{% namespace_url "dashboard-list-by-author" author.slug namespace=namespace default='' %}">{{ author.name }}</a></p>
            {% if author_view and author.slug %}
                <p class="job">{{ author.function }}</p>
                <p class="badge">{{ author.dashboard_count }}</p>
            {% else %}
                <p class="date">{{ dashboard.publishing_date|date }}</p>
            {% endif %}
        </div>
    {% endif %}
</div>
