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

{% set menu = 'admin_block_visual_edit' %}

{% block page_title %} 编辑内容 {% endblock %}

{% set script_controller = 'block/visual-edit' %}
{% block main %}

  {% if app.debug %}
    <a class="btn btn-default btn-sm pull-right" href="{{ path('admin_block_visual_view_data', {blockId:block.id}) }}" target="_blank">查看JSON配置</a>
  {% endif %}

  <div class="col-md-6">
    <h4>{{ block.title }}</h4>
    <form id="block-edit-form" class="visual-edit-form form-horizontal" method="POST" action="">
      {{ web_macro.flash_messages() }}
      {% include 'TopxiaAdminBundle:Block:block-visual-items.html.twig' %}
      <input type="hidden" name="_csrf_token" value="{{ csrf_token('site') }}">
    
      <button id="block-save-btn" data-submiting-text="正在提交" type="submit" class="btn btn-primary" data-toggle="block-edit-form" data-target="#block-edit-form">保存</button>
    </form>
  </div>
  
  

  
  <!-- <div class="col-md-4">
    {% include 'TopxiaAdminBundle:Block:affix-nav.html.twig' %}
  </div> -->

{% endblock %}