{namespace v=FluidTYPO3\Vhs\ViewHelpers}
{namespace ot=Opentalent\OtTemplating\ViewHelpers}

<f:comment><!-- Donors --></f:comment>

<div class="ot-box ot-donors">
    <ot:donors.getAll as="donorsCollection"
                      organizationId="{settings.organizationId}"
                      fromParents="{fromParents}">

        <f:if condition="{donorsCollection.totalItems} > 0">
            <div class="donors-panel">
                <header>
                    <f:if condition="{fromParents}==1">
                        <f:then>
                            <h3><f:translate key="network-partners"/></h3>
                        </f:then>
                        <f:else>
                            <h3><f:translate key="our-partners"/></h3>
                        </f:else>
                    </f:if>

                </header>
                <div class="box-content">
                    <div class="donor-list {f:if(condition: '{ot:template.getPreference(key: \'staticDonors\')}!=1', then: 'carousel')}">
                        <f:for each="{donorsCollection.members}" as="donor">
                            <div class="donor-card">
                                <a href="{ot:utilities.absoluteUrl(url: donor.website)}" target="_blank">
                                    <img src="{donor.logo}" alt="{donor.name}"/>
                                </a>
                            </div>
                        </f:for>
                    </div>
                </div>
            </div>
        </f:if>
    </ot:donors.getAll>
</div>
