{% for code,item in block.meta.items|default(null) %}
<section id="js-affix-{{ code }}">
  <div class="item-title">
    <strong>{{ item.title }}</strong>
    <p class="text-muted">{{ item.desc }}</p>
  </div>

  <div class="panel-group" id="js-accordion-{{ code }}"  data-code="{{ code }}" data-prefix="data[{{ code }}]" data-count="{{ item.count }}" data-role="collapse" role="tablist" aria-multiselectable="true">
    {% for dataId,data in  block.data[code]|default(null)  %}
      <div class="panel panel-default">
        <div class="panel-heading" role="tab" id="{{code}}-heading-{{ dataId }}">
          <h4 class="panel-title clearfix" data-toggle="collapse" data-parent="#js-accordion-{{ code }}" href="#{{code}}-collapse-{{ loop.index }}-{{ dataId }}" aria-expanded="false" aria-controls="{{code}}-collapse-{{ loop.index }}-{{ dataId }}">
            <span class="panel-item-title ellipsis">{{ item.title }}</span>
            <span class="pull-left">&nbsp;-&nbsp;</span> 
            {% include 'TopxiaAdminBundle:Block/Label:' ~ item.type ~ '.html.twig' %}
            {% if item.count != 1 %}
              <i class="js-remove-btn glyphicon glyphicon-trash pull-right" title="删除"></i>
            {% endif %}
          </h4>

        </div>
        <div id="{{code}}-collapse-{{ loop.index }}-{{ dataId }}" class="panel-collapse collapse" role="tabpanel" aria-labelledby="{{code}}-heading-{{ dataId }}">
          <div class="panel-body">
           {% include 'TopxiaAdminBundle:Block/Tag:' ~ item.type ~ '.html.twig' %}
          </div>
        </div>
      </div>

    {% endfor %}

  </div>

{% if item.count != 1 %}
  <div class="btn btn-default text-center js-add-btn" style="width:100%;margin-top:-10px;margin-bottom:20px;">+新增</div>
{% endif %}

</section>
  
{% endfor %}