{% extends 'admin/layout.html.twig' %}

{% set menu = 'admin_coin_orders' %}

{% set script_controller = 'manage/list' %}

{% block main %}

  <form id="coin-orders-search-form" class="form-inline well well-sm" action="" method="get" novalidate>
    <div class="mbm">
    <div class="form-group">
      <label class="ptm" >{{'创建时间:'|trans}}</label>
        <input class="form-control" type="text" id="startDate" name="startDateTime" value="{{request.get('startDateTime')}}" placeholder="{{'起始时间'|trans}}">
        -
        <input class="form-control" type="text" id="endDate" name="endDateTime" value="{{request.get('endDateTime')}}" placeholder="{{'结束时间'|trans}}">
    </div>
    </div>
    <div class="mbm">
    <div class="form-group">
     <label class="ptm" >{{'筛选条件:'|trans}}</label>
      <select class="form-control" name="status">
        {{ select_options({ paid: '已支付'|trans,created:'未付款'|trans,cancelled:'已关闭'|trans}, request.get('status'), '订单状态'|trans) }}
      </select>
      <select class="form-control" name="payment">
        {{ select_options(dict('payment'), app.request.get('payment'), '支付方式'|trans) }}
      </select>
    </div>
   

    <div class="form-group">
     <label class="ptm" >{{'关键词:'|trans}}</label>
        <select class="form-control" name="keywordType">
        {{ select_options(dict('coinOrderType'), app.request.query.get('keywordType'), '--选择类型--'|trans) }}
        </select>
  
    <input type="text" id="keyword" name="keyword" class="form-control" value="{{ app.request.query.get('keyword') }}" placeholder="{{'关键词'|trans}}">
    </div>

    <button class="btn btn-primary">{{'搜索'|trans}}</button>
    <a class="btn btn-primary" href="{{ path('admin_order_manage_export_coin_csv',
    {startTime:request.get('startDateTime'),
    endTime:request.get('endDateTime'),
    status:request.get('status'),
    payment:request.get('payment'),
    keywordType:request.get('keywordType'),
    keyword:request.get('keyword')
    })}}">{{'导出结果'|trans}}</a>
     </div>
  </form>
  {% include 'coin/coin-table.html.twig'  %}

  <div class="paginator">
    {{ admin_macro.paginator(paginator) }} 
  </div>


{% endblock %}