{% extends 'TopxiaAdminBundle:Content:layout.html.twig' %}

{% block title %}编辑区管理 - {{ parent() }}{% endblock %}

{% set menu = 'admin_block' %}
{% set script_controller = 'block/list' %}
{% block main %}
<div class="page-header">
  {% if setting('developer.debug') %}
    <button class="btn btn-info btn-sm pull-right" id="add-block-btn" data-toggle="modal" data-target="#modal" data-url="{{ path('admin_block_create') }}">新增编辑区</button>  
  {% endif %}
  <h1>编辑区管理</h1>
</div>

<table id="block-table" class="table table-striped">
  <thead>
    <tr>
      <th width="50%">标题</th>
      <th width="25%">最近更新</th>
      <th width="25%">操作</th>
    </tr>
  </thead>
  <tbody>
    {% if blocks %}
      {% for block in blocks %}
        {% include 'TopxiaAdminBundle:Block:list-tr.html.twig' %}
      {% endfor %}
  {% else %}
        <tr><td colspan="20"><div class="empty">暂无编辑区记录</div></td></tr>
  {% endif %}
   </tbody>
</table>

 {{ web_macro.paginator(paginator) }} 
{% endblock %}