{% if not has.tabs %}
    <hr>

    <h3>
        {{ __('Relationships') }}
        <span class="label info-pop" data-html="true" data-title="{{ __('Relationships') }}"
            data-content="{{ app.translator.trans('info.relationships', {}, 'infos') }}">{{ __('Info') }}</span>
    </h3>
{% endif %}

{% if has.relations %}
    {% include 'editcontent/_relationships.twig' %}
{% endif %}

{# Output 'incoming' relations #}
{% for reltype, ids in context.content.relation %}
    {% if context.contenttype.relations[reltype] is not defined %}
        <p>{{ __('This record is related to:') }}</p>
        <table class="table table-striped dashboardlisting">
            {% for id in ids %}
                {% setcontent record = reltype ~ '/' ~ id %}
                {% if record %}
                    {% set editable = isallowed('edit', record) %}
                    {% include ['_sub/_listing.twig'] with {'excerptlength': 280, 'thumbsize': 54, 'compact': true, 'content': record} %}
                {% endif %}
            {% endfor %}
        </table>
    {% endif %}
{% endfor %}

{% if not has.tabs %}
    <hr>
{% endif %}

{% if not has.tabs %}
    <hr>

    <h3>
        {{ __('Relationships') }}
        <span class="label info-pop" data-html="true" data-title="{{ __('Relationships') }}"
            data-content="{{ app.translator.trans('info.relationships', {}, 'infos') }}">{{ __('Info') }}</span>
    </h3>
{% endif %}

{% if has.relations %}
    {% include 'editcontent/_relationships.twig' %}
{% endif %}

{# Output 'incoming' relations #}
{% for reltype, ids in context.content.relation %}
    {% if context.contenttype.relations[reltype] is not defined %}
        <p>{{ __('This record is related to:') }}</p>
        <table class="table table-striped dashboardlisting">
            {% for id in ids %}
                {% setcontent record = reltype ~ '/' ~ id %}
                {% if record %}
                    {% set editable = isallowed('edit', record) %}
                    {% include ['_sub/_listing.twig'] with {'excerptlength': 280, 'thumbsize': 54, 'compact': true, 'content': record} %}
                {% endif %}
            {% endfor %}
        </table>
    {% endif %}
{% endfor %}

{% if has.tabs and 'relations' in context.contenttype.groups %}
    {% include 'editcontent/_fields.twig' %}
{% endif %}

{% if not has.tabs %}
    <hr>
{% endif %}

Allow adding fields to the "relations" group
Allow adding fields to the "relations" group