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

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

<section class="page-section-pb partners">
    <div class="container">
        <div class="row mb-30 mt-100 sm-mt-50">

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

                <f:if condition="{donorsCollection.totalItems} > 0">
                    <div class="col-lg-12 col-md-12">
                        <div class="text-center">
                            <h2 class="mb-50">
                                <f:if condition="{fromParents}==1">
                                    <f:then>
                                        <f:translate key="network-partners"/>
                                    </f:then>
                                    <f:else>
                                        <f:translate key="our-partners"/>
                                    </f:else>
                                </f:if>
                            </h2>
                        </div>
                    </div>
                    <div class="col-lg-12 col-md-12">
                        <div class="clients-list partners-list grayscale">
                            <div class="{f:if(condition: '{ot:template.getPreference(key: \'staticDonors\')}!=1', then: 'owl-carousel', else: 'static')}"
                                 data-nav-dots="false"
                                 data-md-items="4"
                                 data-sm-items="3"
                                 data-xs-items="2"
                                 data-xx-items="2">
                                <f:for each="{donorsCollection.members}" as="donor">

                                    <div class="item">
                                        <a href="{ot:utilities.absoluteUrl(url: donor.website)}" target="_blank">
                                            <img class="img-fluid mx-auto"
                                                 src="{donor.logo}"
                                                 alt="{donor.name}" />
                                        </a>
                                    </div>

                                </f:for>
                            </div>
                        </div>
                    </div>
                </f:if>
            </ot:donors.getAll>

        </div>
    </div>
</section>
