{% import "TopxiaAdminBundle::macro.html.twig" as admin_macro %}
<tr id="order-table-{{order.id}}" style="word-break: break-all;word-wrap: break-word;">
  <td>
    {% if order.targetType == 'course' %}
      <a href="{{ path('course_show', {id:order.targetId}) }}" target="_blank"><strong>{{order.title}}</strong></a>
    {% elseif order.targetType == 'vip' %}
      <a href="{{ path('vip', {id:order.targetId}) }}" target="_blank"><strong>{{order.title}}</strong></a>
    {% else %}
      <strong>{{order.title}}</strong>
    {% endif %}
    <br>
    <span class="text-muted text-sm">订单号：{{order.sn}}</span>
  </td>
  <td>{{ dict_text('orderStatus:html', order.status) }}</td>
  <td><span class="money-text">{{order.amount}}</span></td>
  <td>
    {{ admin_macro.user_link(buyer) }}
    <br>
    <span class="text-muted text-sm" title="购买时间">{{ order.createdTime|date('Y-n-d H:i:s') }}</span>
  </td>
  <td>
    {% if order.paidTime > 0 %}
      {{ dict_text('payment', order.payment)|default('--') }}
      <br>
      <span class="text-muted text-sm">{{ order.paidTime |date('Y-n-d H:i:s') }}</span>
      
    {% else %}
      --
    {% endif %}
  </td>
  <td>
    <a href="javascript:;" class="btn btn-sm btn-default" data-toggle="modal" data-target="#modal" data-url="{{ path('admin_order_detail', {id:order.id}) }}">详情</a> 
  </td>
</tr>