{% import "admin/macro.html.twig" as admin_macro %}

<table class="table table-condensed table-noborder table-overflow">
  <thead>
  <tr>
    <th width="52%">{{ '关键词'|trans }}</th>
    <th width="30%">{{ '搜索次数'|trans }}</th>
    <th width="18%"></th>
  </tr>
  </thead>
  <tbody>
  {% for  searchRanking in searchRankings %}
    {% if searchRanking.words %}
      <tr>
        <td>
          <a class="link-primary" target="_blank"
             href="{{ path('cloud_search',{q:searchRanking.words}) }}">{{ searchRanking.words }}</a>
        </td>
        <td class="text-middle">
          <div class="search-count js-cloud-search" data-count="{{ searchRanking.amount }}"></div>
        </td>
        <td>{{ searchRanking.amount }}</td>
      </tr>
    {% endif %}
  {% else %}
    <td><div class="empty">暂无搜索数据</div></td>
  {% endfor %}
  </tbody>
</table>
