{% set standorte =  function('get_terms',{'taxonomy' : 'standort',"hide_empty":false}) %}
        {% set abteilungen =  function('get_terms',{'taxonomy' : 'abteilung',"hide_empty":false}) %}

<div class="amds-team-grid-filter">
    <div class="filter-list">
        <div class="small button-group stacked-for-small">
            <div class="button label">Standort:</div>
            <div class="button filter-location active">Alle</div>
            {% for standort in standorte %}
                <div class="button filter-location {{ standort.name|lower }}">{{ standort.name }}</div>
            {% endfor %}
        </div>
        <div class="small button-group stacked-for-small">
            <div class="button label">Bereich:</div>
            <div class="button filter-department active">Alle</div>
            {% for abteilung in abteilungen %}
                <div class="button filter-department {{ abteilung.name|lower }}">{{ abteilung.name }}</div>
            {% endfor %}
        </div>
    </div>
</div>

<div class="amds-team-grid">

    {% for member in posts %}
        <div class="team-member {{ member.terms('abteilung')|join(',')|lower }} {{ member.terms('standort')|join(',')|lower }}">
            <div class="image">
                <img src="{{ post.thumbnail.src ?? "https://placehold.it/300x300?text=" ~ member.vorname ~ '+' ~ member.nachname }}">
{#                <img src="{{ post.thumbnail.src ?? "https://loremflickr.com/300/300/cat/?lock=" ~ member.ID }}">#}
            </div>
            <div class="details">
                <div class="name">{{ member.vorname }} {{ member.nachname }}</div>
                <div class="position">{{ member.position }}</div>
{#                <div class="abteilung">{{ member.terms('abteilung')|join(',') }}#}
{#                </div>#}

                <div class="standort">{{ member.terms('standort')|join(',') }}
                </div>

                <a href="tel:{{ member.telefonnummer|replace({'0926':'+49926',' ':'','-':''}) }}" class="telefon button small expanded">
                    {{ member.telefonnummer }}
                </a>
                <a href="mailto:{{ function ('antispambot', member.meta('e-mailadresse'), 1) }}" class="email button small expanded ">
                    &nbsp;{{ function ('antispambot', member.meta('e-mailadresse')) }}
                </a>

            </div>
        </div>
    {% endfor %}
</div>

