{% extends "framework.html" %}

{% block content %}
  <div class="panel-group" id="migration-detail">
    <div class="panel panel-default">
      <div
        class="panel-heading"
        id="headingPanel"
        style="font-size:2rem;height: 46px"
      >
        Migration Status BT Rules
      </div>
      <div class="panel-body">
        <p>Rules with Error: {{ error }}/{{ total }}</p>
        <p>Rules without Error: {{ success }}/{{ total }}</p>
      </div>

      {% for obj in results %}
        <div
          class="panel panel-default panel-heading list-group-item"
          style="background-color:silver"
        >
          {% if obj.status %}
            <span
              class="glyphicon glyphicon-ok"
              aria-hidden="true"
              style="float:right"
              data-toggle="tooltip"
              data-placement="top"
              title=""
              data-original-title="Reviewed"
            >
            </span>
          {% else %}
            <span
              class="glyphicon glyphicon-remove"
              aria-hidden="true"
              style="float:right"
              data-toggle="tooltip"
              data-placement="top"
              title=""
              data-original-title="Reviewed"
            >
            </span>
          {% endif %}
          <h4 class="panel-title">
            <a
              id="{{ obj.id }}-link"
              data-toggle="collapse"
              data-parent="#migration-detail"
              href="#{{ obj.id }}"
              >{{ obj.name|safe }}</a
            >
          </h4>
        </div>
        <div
          id="{{ obj.id }}"
          class="panel-collapse {% if not obj.status %}in{% endif %} collapse"
        >
          <div class="panel-body list-group-item">
            <a class="list-group-item" href="{{ obj.detail_url }}"
              >{{ obj.name|safe }} Migration Detail Page</a
            >
          </div>
        </div>
      {% endfor %}
    </div>
  </div>

  <script></script>
{% endblock content %}
