{namespace poi=Newland\Toubiz\Poi\Neos\ViewHelpers}
{namespace vh=Newland\NeosViewHelpers\ViewHelpers}

<f:if condition="{article.isCity}">
    <f:then>
        <f:if condition="{article.cityData.facts}">
            <h2 class="mt-0 mb-2 text-xl">
                {vh:translate(id: 'facts.header', package: 'Newland.Toubiz.Poi.Neos', source: 'Views/Show')}
            </h2>
            <div class="mb-4 text-grey-darkest leading-normal text-base">
                {article.cityData.facts -> f:format.raw()}
            </div>
        </f:if>
    </f:then>
    <f:else>
        <vh:render partial="PointOfInterests/Show/Content/Address"
                   arguments="{article: article, sectionHeadline: '{vh:translate(id: \'contact.header\', package: \'Newland.Toubiz.Poi.Neos\', source: \'Views/Show\')}'}"/>
        <vh:render partial="PointOfInterests/Show/Content/SocialIcons" arguments="{_all}"/>
        <vh:render partial="PointOfInterests/Show/Content/RoutePlanner" arguments="{_all}"/>
    </f:else>
</f:if>

<f:if condition="{article.files} || {article.outdoorActiveTour}">
    <div class="mb-8">
        <h2 class="mt-0 mb-2 text-xl">
            {vh:translate(id: 'downloads.header', package: 'Newland.Toubiz.Poi.Neos', source: 'Views/Show')}
        </h2>
        <ul class="tb-downloads">
            <f:for each="{article.files}" as="file">
                <vh:render
                        partial="DownloadItem"
                        arguments="{
                        url: file.sourceUri,
                        label: file.name
                    }"/>

            </f:for>

            <f:if condition="{article.outdoorActiveTour}">
                <vh:render
                        partial="DownloadItem"
                        arguments="{
                        url: '{poi:uri.outdoorActive.gpx(article: article)}',
                        label: '{vh:translate(id: \'outdoorActive.gpx\', package: \'Newland.Toubiz.Poi.Neos\', source: \'Models/Article\')}'
                    }"/>

                <vh:render
                        partial="DownloadItem"
                        arguments="{
                        url: '{poi:uri.outdoorActive.kml(article: article)}',
                        label: '{vh:translate(id: \'outdoorActive.kml\', package: \'Newland.Toubiz.Poi.Neos\', source: \'Models/Article\')}'
                    }"/>

            </f:if>
        </ul>
    </div>
</f:if>
<f:if condition="{article.flatAttributes.additionalInformation}">
    <div class="mb-8">
        <h2 class="mt-0 mb-2 text-xl">
            {vh:translate(id: 'property.attribute.additionalInformation', package: 'Newland.Toubiz.Poi.Neos', source:
            'Models/Article')}
        </h2>

        <vh:render partial="PointOfInterests/Attribute"
                   arguments="{
                type: 'text',
                name: 'additionalInformation',
                attribute: article.flatAttributes.additionalInformation
            }"/>
    </div>
</f:if>
<f:if condition="{vh:collection.includesValue(collection: configuration.displayOptions.show.hide, value: 'source')} == false">
    <div class="mb-8">
        <h2 class="mt-0 mb-2 text-xl">
            {vh:translate(id: 'source.header', package: 'Newland.Toubiz.Poi.Neos', source: 'Views/Show')}
        </h2>

        <div class="tb-source"
             itemprop="subjectOf"
             class="tb-source"
             itemscope
             itemtype="http://schema.org/CreativeWork">

            <p class="tb-source__text">
                <f:if condition="{article.sourceName}">
                    <strong itemprop="sourceOrganization">{article.sourceName}</strong>
                    <br/>
                </f:if>
                <f:if condition="{article.authorName}">
                    {vh:translate(id: 'source.property.author', package: 'Newland.Toubiz.Poi.Neos', source:
                    'Views/Show')}:
                    <span itemprop="author">{article.authorName}</span>
                </f:if>
            </p>
        </div>
    </div>
</f:if>
