<table id="FIXs" class="table table-hover table-striped">
  <thead>
      <tr><td><strong>Vulns</strong></td></tr>
    <tr class="warning">
      <td>CVEID</td><td>Binary Package</td><td>Installed Versions</td><td>Vuln Versions</td><td>Fixed</td><td>Fixed Versions</td><td>Remotely Exploitable</td><td>Urgency</td>
    </tr>
  </thead>
  <tbody>
    {% for v in vulns %}
      <tr id ="{{ v['id'] }}" class="{{class}}" {{'style=color:'+c['color'] if 'color' in c else ''}}>
        <td>
          <a href="http://{{ cveSearchURL }}/cve/{{ v['id'] }}">{{ v['id'] }}</a>
        </td>
        <td>
          {{ v['bin_package'] }}
        </td>
        <td>
          {% set vuln_index = loop.index %}

          {% if v['bin_versions']|length == 1 %}
            {{ v['bin_versions'][0] }}
          {% else %}
            
            {% for bin_version in v['bin_versions'] %}
           
              {% if loop.index == 1 %}{{ bin_version }}
              <span class="glyphicon glyphicon-plus" data-toggle="collapse" data-target="#binversionscell{{vuln_index}}"></span>
                <ul id="binversionscell{{vuln_index}}" class="collapse list-unstyled">
              {% else %}
                <li>{{ bin_version }}</li>
              {% endif %}
            {% endfor %}
              {% if  v['bin_versions']|length > 1 %}
                </ul>
              {% endif %}
          {% endif %}
        </td>
        <td>
          {% set vuln_index = loop.index %}

          {% if v['vuln_versions']|length == 1 %}
            {{ v['vuln_versions'][0] }}
          {% else %}
            
            {% for vuln_version in v['vuln_versions'] %}
           
              {% if loop.index == 1 %}{{ vuln_version }}
              <span class="glyphicon glyphicon-plus" data-toggle="collapse" data-target="#vulnversionscell{{vuln_index}}"></span>
                <ul id="vulnversionscell{{vuln_index}}" class="collapse list-unstyled">
              {% else %}
                <li>{{ vuln_version }}</li>
              {% endif %}
            {% endfor %}
              {% if  v['vuln_versions']|length > 1 %}
                </ul>
              {% endif %}
          {% endif %}
        </td>
        <td>
            {{ v['fixed'] }}
        </td>
        <td>
          {% set vuln_index = loop.index %}

          {% if v['fixed_versions']|length == 1 %}
            {{ v['fixed_versions'][0] }}
          {% else %}
            
            {% for fixed_version in v['fixed_versions'] %}
           
              {% if loop.index == 1 %}{{ fixed_version }}
              <span class="glyphicon glyphicon-plus" data-toggle="collapse" data-target="#fixedversionscell{{vuln_index}}"></span>
                <ul id="fixedversionscell{{vuln_index}}" class="collapse list-unstyled">
              {% else %}
                <li>{{ fixed_version }}</li>
              {% endif %}
            {% endfor %}
              {% if  v['fixed_versions']|length > 1 %}
                </ul>
              {% endif %}
          {% endif %}
        </td>
        <td>
          {% if v['remotely_exp'] is none %}
            unknown
          {% elif v['remotely_exp'] %}
            yes
          {% elif not v['remotely_exp'] %}
            no
          {% endif %}
        </td>
        <td>
          {% if v['urgency'] == "" %}
            unknown
          {% else %}
            {{ v['urgency'] }}
          {% endif %}
        </td>
      </tr>
    {% endfor %}
  </tbody>
</table>
<a href="#" class="back-to-top">Back to Top</a>
<a href="#" class="select-submit">Mark selected</a>
