<html
    xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
    data-namespace-typo3-fluid="true"
>
<h2>{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_show_rechis.xlf:mergedDifferences')}</h2>

<f:if condition="{revertAllUrl}">
    <f:then>
        <p><f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_show_rechis.xlf:mergedDifferences.description" /></p>

        <div class="diff-group">
            <f:for each="{multipleDiff}" as="historyRow">
                <h3>{historyRow.title}</h3>
                <div class="row">
                    <div class="col">
                        <f:if condition="{historyRow.insertDelete} || {historyRow.fieldNames} || {historyRow.differences -> f:count()}">
                            <div class="diff-group">
                                <f:if condition="{historyRow.insertDelete} == 'delete'">
                                    <p><strong>{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_show_rechis.xlf:rollback.plannedAction.delete')}</strong></p>
                                </f:if>
                                <f:if condition="{historyRow.insertDelete} == 'insert'">
                                    <p><strong>{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_show_rechis.xlf:rollback.plannedAction.insert')}</strong></p>
                                </f:if>
                                <f:if condition="{historyRow.fieldNames}">
                                    <p>{historyRow.fieldNames}</p>
                                </f:if>
                                <f:if condition="{historyRow.differences}">
                                    <f:render partial="RecordHistory/Diff" arguments="{differences: historyRow.differences}"/>
                                </f:if>
                            </div>
                        </f:if>
                    </div>
                </div>
                <a href="{historyRow.revertRecordUrl}" class="btn btn-default">{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_show_rechis.xlf:revertRecord')}</a>
            </f:for>
        </div>
        <a href="{revertAllUrl}" class="btn btn-default">{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_show_rechis.xlf:revertAll')}</a>
    </f:then>
    <f:else>
        <p>{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_show_rechis.xlf:noDifferences')}</p>
    </f:else>
</f:if>

</html>
