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

{% block title %}虚拟币管理 - {{ parent() }}{% endblock %}

{% set menu = 'coin' %}
{% set submenu = 'admin' %}

 
{% block main %}
    {% include 'TopxiaAdminBundle:Coin:coin-ul.html.twig' %}

    <div class="page-header">
        <a href="javascript:;" class="btn btn-info btn-sm pull-right" data-toggle="modal" data-target="#modal" data-url="{{path('admin_coin_give')}}">发放虚拟币</a>
        <h1>虚拟币管理</h1>

    </div>

    <form id="coin-orders-search-form" class="form-inline well well-sm" action="" method="get" novalidate>

        <div class="form-group">
          <input class="form-control " type="text" placeholder="请输入用户名" name="nickName" value="{{ app.request.get('nickName') }}">

          <button class="btn btn-primary">搜索</button>
        </div>
    </form>



    <div class="table-responsive">
        <table class="table table-striped">
           <tr>
                <th width="70%">用户名</th>
                <th>虚拟币余额</th>
                <th>操作</th>
           </tr>

            {% if cashes %}
                {% for cash in cashes %}
                <tr>
                    <td><a target="_blank" href="{{ path('user_show', {id:cash.userId}) }}">
                    {{users[cash.userId].nickname}}</a></td>
                    <td>{{cash.cash|score_text}}</td>
                    <td><a href="javascript:;" class="btn btn-sm btn-default" data-toggle="modal" data-target="#modal" data-url="{{path('admin_coin_admin_edit',{id:cash.id})}}">修改</a></td>
                </tr>
                {% endfor %}

            {% endif %}
      
        </table>
    </div>
 {{ web_macro.paginator(paginator) }}
<div class="alert alert-info">
  <p><strong>注：虚拟币记录只有在进入虚拟币页面时才会记录</strong></p>
</div>
{% endblock %}