{% extends "fellchensammlung/base.html" %}
{% load custom_tags %}
{% load i18n %}
{% load admin_urls %}

{% block title %}<title>{{ org.name }}</title>{% endblock %}
{% block og_title %}
    <meta property="og:title" content="{{ org.name }} - Notfellchen"/>
{% endblock %}
{% block description %}
    <meta name="description" content="{{ org.name }}: {% translate 'Kontaktdaten und Tiere zur Adoption' %}">
{% endblock %}
{% block og_description %}
    <meta property="og:description" content="{{ org.name }}: {% translate 'Kontaktdaten und Tiere zur Adoption' %}">
{% endblock %}
{% block canonical_url %}{% host %}{% url 'rescue-organization-detail' rescue_organization_id=org.id %}{% endblock %}

{% block content %}
    <div class="columns">
        <div class="column">
            <div class="block">
                <div class="card">
                    <div class="card-header">
                        <h1 class="card-header-title">{{ org.name }}</h1>
                    </div>
                    <div class="card-content">
                        <div class="block">
                            <b><i class="fa-solid fa-location-dot"></i></b>
                            {% if org.location %}
                                {{ org.location }}
                            {% else %}
                                {{ org.location_string }}
                            {% endif %}
                            {% if org.description %}
                                <p>{{ org.description | render_markdown }}</p>
                            {% endif %}
                        </div>
                    </div>
                </div>
            </div>
            <div class="block">
                {% include "fellchensammlung/partials/partial-rescue-organization-contact.html" %}
            </div>
            <div class="block">
                <a class="button is-warning is-fullwidth" href="{% url org_meta|admin_urlname:'change' org.pk %}"><i class="fa-solid fa-tools fa-fw"></i> Admin interface</a>
            </div>
        </div>
        <div class="column">
            {% include "fellchensammlung/partials/partial-map.html" %}
        </div>
    </div>


    <h2>{% translate 'Vermittlungen der Organisation' %}</h2>
    <div class="container-cards">
        {% if org.adoption_notices %}
            {% for adoption_notice in org.adoption_notices %}
                {% include "fellchensammlung/partials/partial-adoption-notice-minimal.html" %}
            {% endfor %}
        {% else %}
            <p>{% translate "Keine Vermittlungen gefunden." %}</p>
        {% endif %}
    </div>
{% endblock %}
