{namespace ttaddr=FriendsOfTYPO3\TtAddress\ViewHelpers}

<f:section name="detailed">
    <div class="vcard" itemscope itemtype="http://schema.org/Person">

        <div class="row">
            <div class="col-md-2 addressImage">
                <f:link.action action="show" arguments="{address : address}"
                               title="{address.fullName}"
                               pageUid="{settings.singlePid}">
                    <f:if condition="{address.image}">
                        <f:media file="{address.firstImage}" width="400" class="img-fluid img-thumbnail rounded"
                                 alt="{img.originalResource.alt}"
                                 title="{address.fullName}"/>
                    </f:if>
                </f:link.action>
            </div>
            <div class="col-md-10">
                <h3>{address.fullName}</h3>
                <f:if condition="{address.position}">
                    <p class="position"><em>{address.position}</em></p>
                </f:if>

                <f:render section="address" partial="Address" arguments="{_all}"/>
                <f:render section="social" partial="Address" arguments="{_all}"/>

                <f:if condition="{settings.singlePid}">
                    <f:link.action action="show" arguments="{address : address}"
                                   title="{address.fullName}"
                                   pageUid="{settings.singlePid}" class="btn btn-default">{f:translate(key:'more')}
                    </f:link.action>
                </f:if>
            </div>
        </div>
    </div>
</f:section>

<f:section name="shortInfo">
    <f:switch expression="{address.gender}">

        <f:case value="f">{f:variable(name: 'salutation', value: 'Frau')}</f:case>
        <f:case value="m">{f:variable(name: 'salutation', value: 'Herr')}</f:case>
        <f:defaultCase>{f:variable(name: 'salutation', value: '')}</f:defaultCase>
    </f:switch>
    <tr class="vcard tt_address_shortInfo" itemscope itemtype="http://schema.org/Person">
    <td class="address-name">
        <span itemprop="name">{salutation} {address.fullName}</span>
    </td>
    <td class="address-contact">
        <a href="tel:{address.phone->ttaddr:removeSpaces()}"><span itemprop="telephone">{address.phone}</span></a>
    </td>
    </tr>
</f:section>
