<NME> _block.twig
<BEF> {% set labelkey = field.label ?: key|ucfirst %}
{% set data_bolt_widget = {
    fieldBlock: {
        name:    name,
    }
} %}

<fieldset class="bolt-field-block" data-bolt-widget="{{ data_bolt_widget|json_encode }}">
    <legend class="sr-only">{{ labelkey }}</legend>
    <label class="main col-xs-12">{{ labelkey }}</label>
    {% if 'html' not in context.fieldtypes %}
        {{ include('@bolt/editcontent/fielddata/_html.twig') }}
    {% endif %}

    {# Prefix #}
    {% if field.prefix is defined and field.prefix is not empty %}
        <div class="prefix">
            {{ field.prefix|markdown }}
        </div>
    {% endif %}

    {# This ensures that an empty value is always submitted even if there are no subsequent repeater sets #}
    <input type="hidden" name="{{ name }}[]">

    {# show/hide panel content buttons #}
    {% if field.collapsible is not defined or field.collapsible %}
        <div class="block-collapse text-right">
            <div class="btn-group">
                <button type="button" class="btn btn-sm btn-default hide-all-blocks">
                    {{ __('field.repeater.collapse-all') }}
                </button>
                <button type="button" class="btn btn-sm btn-default show-all-blocks">
                    {{ __('field.repeater.expand-all') }}
                </button>
            </div>
    <div class="col-xs-12">
        <div class="block-add">
            <div class="btn-group">
                <button type="button" class="btn btn-default">{{ __('field.block.label.add-new') }}</button>
                <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                    <span class="caret"></span>
                </button>
                <ul class="dropdown-menu" role="menu">
                    {% for blockname, block in field.fields %}
                        <li>
                            <a class="add-button" data-block-type="{{ blockname }}">
                                <i class="fa fa-plus"></i> {{  __('field.block.label.add-set', {'%label%': block.label}) }}
        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
            {{ __('field.block.label.add-new') }}
            <span class="caret"></span>
        </button>
        <ul class="dropdown-menu" role="menu">
            {% for blockname, block in field.fields %}
                {% if block.group is defined %}
                    {% if not loop.first %}
                        <li class="divider"></li>
                    {% endif %}
                    <li class="dropdown-header">{{ block.group }}</li>
                {% endif %}
                <li>
                    <a class="add-button" data-block-type="{{ blockname }}">
                        {% set groupicon = block.icon|default('') %}
                        {% set grouplabel = block.label|default(blockname) %}
                        {% if groupicon[:3] == 'fa:' %}
                            <i class="fa fa-{{ groupicon[3:] }} fa-fw"></i> {{  __('field.block.label.add-set', {'%label%': grouplabel}) }}
                        {% else %}
                            <i class="fa fa-plus"></i> {{  __('field.block.label.add-set', {'%label%': grouplabel}) }}
                        {% endif %}
                    </a>
                </li>
            {% endfor %}
        </ul>
    </div>

</fieldset>

<MSG> Merge pull request #7099 from xiaohutai/3.4

Allow `group` on named repeater's sets
<DFF> @@ -36,12 +36,18 @@
     <div class="col-xs-12">
         <div class="block-add">
             <div class="btn-group">
-                <button type="button" class="btn btn-default">{{ __('field.block.label.add-new') }}</button>
                 <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
+                    {{ __('field.block.label.add-new') }}
                     <span class="caret"></span>
                 </button>
                 <ul class="dropdown-menu" role="menu">
                     {% for blockname, block in field.fields %}
+                        {% if block.group is defined %}
+                            {% if not loop.first %}
+                                <li class="divider"></li>
+                            {% endif %}
+                            <li class="dropdown-header">{{ block.group }}</li>
+                        {% endif %}
                         <li>
                             <a class="add-button" data-block-type="{{ blockname }}">
                                 <i class="fa fa-plus"></i> {{  __('field.block.label.add-set', {'%label%': block.label}) }}

{'commit': 'diff --git a/app/view/twig/editcontent/fields/_block.twig b/app/view/twig/editcontent/fields/_block.twig\nindex b2a6ce886..4024e166c 100644\n--- a/app/view/twig/editcontent/fields/_block.twig\n+++ b/app/view/twig/editcontent/fields/_block.twig\n@@ -36,12 +36,18 @@\n     <div class="col-xs-12">\n         <div class="block-add">\n             <div class="btn-group">\n-                <button type="button" class="btn btn-default">{{ __(\'field.block.label.add-new\') }}</button>\n                 <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">\n+                    {{ __(\'field.block.label.add-new\') }}\n                     <span class="caret"></span>\n                 </button>\n                 <ul class="dropdown-menu" role="menu">\n                     {% for blockname, block in field.fields %}\n+                        {% if block.group is defined %}\n+                            {% if not loop.first %}\n+                                <li class="divider"></li>\n+                            {% endif %}\n+                            <li class="dropdown-header">{{ block.group }}</li>\n+                        {% endif %}\n                         <li>\n                             <a class="add-button" data-block-type="{{ blockname }}">\n                                 <i class="fa fa-plus"></i> {{  __(\'field.block.label.add-set\', {\'%label%\': block.label}) }}\n', 'commit_subject': 'Merge pull request #7099 from xiaohutai/3.4', 'repo_name': 'bolt/bolt', 'committer': {'name': 'GitHub', 'email': '1505422b2465e9a84f6fdfaa161078890c593f06@github.com', 'time_sec': '1508313067', 'tz_offset': '120', 'date': {'seconds': '1508313067'}}, 'commit_tree': '210059e52146a0140f23b409d181c52cbbf5464c', 'commit_message': "Merge pull request #7099 from xiaohutai/3.4\n\nAllow `group` on named repeater's sets", 'language_name': 'Shell', 'license': 'mit', 'hunks': '@@ -36,12 +36,18 @@\n     <div class="col-xs-12">\n         <div class="block-add">\n             <div class="btn-group">\n-                <button type="button" class="btn btn-default">{{ __(\'field.block.label.add-new\') }}</button>\n                 <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">\n+                    {{ __(\'field.block.label.add-new\') }}\n                     <span class="caret"></span>\n                 </button>\n                 <ul class="dropdown-menu" role="menu">\n                     {% for blockname, block in field.fields %}\n+                        {% if block.group is defined %}\n+                            {% if not loop.first %}\n+                                <li class="divider"></li>\n+                            {% endif %}\n+                            <li class="dropdown-header">{{ block.group }}</li>\n+                        {% endif %}\n                         <li>\n                             <a class="add-button" data-block-type="{{ blockname }}">\n                                 <i class="fa fa-plus"></i> {{  __(\'field.block.label.add-set\', {\'%label%\': block.label}) }}\n', 'addition_count': 7, 'deletion_count': 1, 'src_file': 'a/app/view/twig/editcontent/fields/_block.twig', 'tgt_file': 'b/app/view/twig/editcontent/fields/_block.twig', 'file_extension': '.twig', 'before_file': '{% set labelkey = field.label ?: key|ucfirst %}\n{% set data_bolt_widget = {\n    fieldBlock: {\n        name:    name,\n    }\n} %}\n\n<fieldset class="bolt-field-block" data-bolt-widget="{{ data_bolt_widget|json_encode }}">\n    <legend class="sr-only">{{ labelkey }}</legend>\n    <label class="main col-xs-12">{{ labelkey }}</label>\n    {% if \'html\' not in context.fieldtypes %}\n        {{ include(\'@bolt/editcontent/fielddata/_html.twig\') }}\n    {% endif %}\n\n    {# Prefix #}\n    {% if field.prefix is defined and field.prefix is not empty %}\n        <div class="prefix">\n            {{ field.prefix|markdown }}\n        </div>\n    {% endif %}\n\n    {# This ensures that an empty value is always submitted even if there are no subsequent repeater sets #}\n    <input type="hidden" name="{{ name }}[]">\n\n    {# show/hide panel content buttons #}\n    {% if field.collapsible is not defined or field.collapsible %}\n        <div class="block-collapse text-right">\n            <div class="btn-group">\n                <button type="button" class="btn btn-sm btn-default hide-all-blocks">\n                    {{ __(\'field.repeater.collapse-all\') }}\n                </button>\n                <button type="button" class="btn btn-sm btn-default show-all-blocks">\n                    {{ __(\'field.repeater.expand-all\') }}\n                </button>\n            </div>\n    <div class="col-xs-12">\n        <div class="block-add">\n            <div class="btn-group">\n                <button type="button" class="btn btn-default">{{ __(\'field.block.label.add-new\') }}</button>\n                <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">\n                    <span class="caret"></span>\n                </button>\n                <ul class="dropdown-menu" role="menu">\n                    {% for blockname, block in field.fields %}\n                        <li>\n                            <a class="add-button" data-block-type="{{ blockname }}">\n                                <i class="fa fa-plus"></i> {{  __(\'field.block.label.add-set\', {\'%label%\': block.label}) }}\n        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">\n            {{ __(\'field.block.label.add-new\') }}\n            <span class="caret"></span>\n        </button>\n        <ul class="dropdown-menu" role="menu">\n            {% for blockname, block in field.fields %}\n                {% if block.group is defined %}\n                    {% if not loop.first %}\n                        <li class="divider"></li>\n                    {% endif %}\n                    <li class="dropdown-header">{{ block.group }}</li>\n                {% endif %}\n                <li>\n                    <a class="add-button" data-block-type="{{ blockname }}">\n                        {% set groupicon = block.icon|default(\'\') %}\n                        {% set grouplabel = block.label|default(blockname) %}\n                        {% if groupicon[:3] == \'fa:\' %}\n                            <i class="fa fa-{{ groupicon[3:] }} fa-fw"></i> {{  __(\'field.block.label.add-set\', {\'%label%\': grouplabel}) }}\n                        {% else %}\n                            <i class="fa fa-plus"></i> {{  __(\'field.block.label.add-set\', {\'%label%\': grouplabel}) }}\n                        {% endif %}\n                    </a>\n                </li>\n            {% endfor %}\n        </ul>\n    </div>\n\n</fieldset>\n', 'message': "Merge pull request #7099 from xiaohutai/3.4\n\nAllow `group` on named repeater's sets", 'author_name': 'GitHub', 'lang': 'twig'}