{% extends "AppBundle::layout.html.twig" %}
{% block body%}

<div class="container-fluid">
    <div class="row">
    <div class="col-md-12">
        <div class="row">
      <div class="col-md-4">
        <a href="{{path("app_home_tags")}}" class="btn  btn-lg btn-warning" style="    width: 100%;"><i class="material-icons" style="font-size: 30px;">refresh</i> Refresh</a>
      </div>
      <div class="col-md-4">
        <a class="btn btn btn-lg btn-yellow" style="    width: 100%;"><i class="material-icons" style="font-size: 30px;">view_list</i> TAGS :  {{tags|length}} </a>
      </div>
    </div>
      <div class="card">
          <div class="card-content">
              <h4 class="card-title">Messages list</h4>
              <div class="table-responsive">
                  <table class="table" width="100%">
                      <thead class="text-primary">
                        <tr>
                          <th>Tag</th>
                          <th>Search Number</th>
                          <th width="160px">Action</th>
                        </tr>
                      </thead>
                      <tbody>
                      {% for tag in tags %}
                          <tr>
                              <td><span class="label label-success">{{tag.name}}</span></td>
                              <td>{{tag.search}}</td>
                              <td>
                                <a href="{{path("app_home_tags_delete",{"id":tag.id})}}" rel="tooltip" data-placement="left" class=" btn btn-danger btn-xs btn-round" data-original-title="Delete">
                                        <i class="material-icons">delete</i>
                                    </a>
                                </td>
                          </tr>
                          {% else %}
                      <tr>
                        <td colspan="4">
                          <br>
                          <br>
                          <center><img src="{{asset("img/bg_empty.png")}}"  style="width: auto !important;" =""></center>
                            <br>
                            <br>
                        </td>
                      </tr> 
                {% endfor %}
                      </tbody>
                  </table>

              </div>
          </div>
      <div class=" pull-right">
        {{ knp_pagination_render(tags) }}
      </div>
        </div>
      </div>
  </div>
                            
{% endblock%}

