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

<table class="table table-condensed table-noborder table-overflow">
  <thead>
  <tr>
    <th width="52%">{{ 'admin.homepage.top_search.keyword_th'|trans }}</th>
    <th width="30%">{{ 'admin.homepage.top_search.search_number_th'|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">{{ 'admin.homepage.top_search.empty'|trans }}</div></td>
  {% endfor %}
  </tbody>
</table>
