{% load i18n %}
{% load custom_tags %}
<div class="card">
    <a href="{{ adoption_notice.get_absolute_url }}" class="card-header">
        <div class="card-header-title">
            {{ adoption_notice.name }}
        </div>
    </a>
    <div class="card-content">
        <i>{% translate 'Zuletzt geprüft:' %} {{ adoption_notice.last_checked_hr }}</i>
        {% if adoption_notice.further_information %}
            <p>{% translate "Externe Quelle" %}:
                <a href="{{ adoption_notice.further_information }}" target="_blank">
                    {{ adoption_notice.further_information | domain }}
                </a>
            </p>
        {% endif %}
    </div>
    <div class="card-footer">
        <div class="card-footer-item is-confirm">
            <form method="post">
                {% csrf_token %}
                <input type="hidden"
                       name="adoption_notice_id"
                       value="{{ adoption_notice.pk }}">
                <input type="hidden" name="action" value="checked_active">
                <button class="" type="submit">{% translate "Vermittlung noch aktuell" %}</button>
            </form>
        </div>
        <div class="card-footer-item is-warning">
            <form method="post">
                {% csrf_token %}
                <input type="hidden"
                       name="adoption_notice_id"
                       value="{{ adoption_notice.pk }}">
                <input type="hidden" name="action" value="checked_inactive">
                <button class="" type="submit">{% translate "Vermittlung inaktiv" %}</button>
            </form>
        </div>
    </div>
</div>