{% load util %}
{% load i18n %}
{% with page_title=request|make_page_title_for_search_result %}
{% include 'site/header.html' %}
{% endwith %}
{% include 'site/view_header.html' %}

<div class="view_info left">
<div class="container">

<div class="search-result">
  <div class="row">
    <div class="col-md-3 col-sm-12 col-xs-12">
      <div class="view_title">{% trans "Exchanges" %} ({{ count_ixp }})</div>
      {% for row in search_ixp %}
      <div class="result_row">
        <a href="/{{'InternetExchange'|ref_tag}}/{{row.id}}">{{row.name}}</a>
        {% if row.sponsorship %}
        <a href="/sponsors" class="sponsor {{ row.sponsorship.css }}">{{ row.sponsorship.label }} {% trans "sponsor" %}</a>
        {% endif %}
        {% if row.sub_name %}<div class="highlight">{{ row.sub_name }}</div>{% endif %}
      </div>
      {% endfor %}

    </div>
    <div class="col-md-3 col-sm-12 col-xs-12">
      <div class="view_title">{% trans "Networks" %} ({{ count_net }})</div>
      {% for row in search_net%}
      <div class="result_row">
        <a href="/{{'Network'|ref_tag}}/{{row.id}}">{{row.name}}</a>
        {% if row.sponsorship %}
        <a href="/sponsors" class="sponsor {{ row.sponsorship.css }}">{{ row.sponsorship.label }} {% trans "sponsor" %}</a>
        {% endif %}
        {% if row.sub_name %}<div class="highlight">{{ row.sub_name }}</div>{% endif %}
      </div>
      {% endfor %}


    </div>
    <div class="col-md-3 col-sm-12 col-xs-12">
      <div class="view_title">{% trans "Facilities" %} ({{ count_fac }})</div>
      {% for row in search_fac %}
      <div class="result_row">
        <a href="/{{'Facility'|ref_tag}}/{{row.id}}">{{row.name}}</a>
        {% if row.sponsorship %}
        <a href="/sponsors" class="sponsor {{ row.sponsorship.css }}">{{ row.sponsorship.label }} {% trans "sponsor" %}</a>
        {% endif %}
        {% if row.sub_name %}<div class="highlight">{{ row.sub_name }}</div>{% endif %}
      </div>
      {% endfor %}
    </div>

    <div class="col-md-3 col-sm-12 col-xs-12">
      <div class="view_title">{% trans "Organizations" %} ({{ count_org }})</div>
      {% for row in search_org %}
      <div class="result_row">
        <a href="/{{'Organization'|ref_tag}}/{{row.id}}">{{row.name}}</a>
        {% if row.sponsorship %}
        <a href="/sponsors" class="sponsor {{ row.sponsorship.css }}">{{ row.sponsorship.label }} {% trans "sponsor" %}</a>
        {% endif %}
        {% if row.sub_name %}<div class="highlight">{{ row.sub_name }}</div>{% endif %}
      </div>
      {% endfor %}
    </div>

  </div>
</div>

{% if request.user.is_verified_user %}
<div>
  <div class="row">
    <div class="col-md-3 col-sm-12 col-xs-12">
      <div class="center marg-top-15">
        <!-- <a class="btn btn-default" href="/suggest/ix">{% trans "Suggest Exchange" %}</a> -->
      </div>
    </div>
    <div class="col-md-3 col-sm-12 col-xs-12">
      <div class="center marg-top-15">
        <!-- <a class="btn btn-default" href="/suggest/net">{% trans "Suggest Network" %}</a> -->
      </div>
    </div>
    <div class="col-md-3 col-sm-12 col-xs-12">
      <div class="center marg-top-15">
        <a class="btn btn-default" href="/suggest/fac">{% trans "Suggest Facility" %}</a>
      </div>
    </div>
    <div class="col-md-3 col-sm-12 col-xs-12">
      <div class="center marg-top-15">
        <!-- <a class="btn btn-default" href="/suggest/net">{% trans "Suggest Network" %}</a> -->
      </div>
    </div>
  </div>
</div>
{% endif %}

</div>

</div>


{% include 'site/footer.html' %}
