<table id="FIXs" class="table table-hover table-striped">
  <thead>
    <tr><td><strong>Fixes</strong></td></tr>
    <tr class="warning">
      <td>Host</td><td>Binary Package</td><td>Source Package</td><td>Binary Version</td><td>Fixed Version</td><td>CVEIDs</td><td>Remotely Exploitable</td><td>Urgency</td><td>OS Version</td><td>Skipped</td>
    </tr>
  </thead>
  <tbody>
    {% for f in fixes %}
      <tr id ="{{ f['host'] }}" class="{{class}}" {{'style=color:'+c['color'] if 'color' in c else ''}}>
        <td>
          {% set fix_index = loop.index %}
             
            {% if f['hosts']|length == 1 %}
              {{ f['hosts'][0] }}
            {% else %}
            
            {% for host in f['hosts'] %}
              {% if loop.index == 1 %}{{ host }}
              <span class="glyphicon glyphicon-plus" data-toggle="collapse" data-target="#hostscell{{fix_index}}"></span>
                <ul id="hostscell{{fix_index}}" class="collapse list-unstyled">
              {% else %}
                  <li>{{ host }}</li>
              {% endif %}
            {% endfor %}
                </ul>
            {% endif %}
        </td>
        <td>
          {{ f['bin_package'] }}
        </td>
        <td>
          {{ f['src_package'] }}
        </td>
        <td>
          {{ f['bin_version'] }}
        </td>
        <td>
          {{ f['fixed_version'] }}
        </td>
        <td>
            {% set fix_index = loop.index %}
             
            {% if f['cve_ids']|length == 1 %}
            <a href="http://{{ cveSearchURL }}/cve/{{ f['cve_ids'][0] }}">{{ f['cve_ids'][0] }}</a>
            {% else %}
            
            {% for cve_id in f['cve_ids'] %}
              {% if loop.index == 1 %}<a href="http://{{ cveSearchURL }}/cve/{{ cve_id }}">{{ cve_id }}</a>
              <span class="glyphicon glyphicon-plus" data-toggle="collapse" data-target="#cveidscell{{fix_index}}"></span>
                <ul id="cveidscell{{fix_index}}" class="collapse list-unstyled">
              {% else %}
                  <li><a href="http://{{ cveSearchURL }}/cve/{{ cve_id }}">{{ cve_id }}</a></li>
              {% endif %}
            {% endfor %}
              {% if  f['cve_ids']|length > 1 %}
                </ul>
              {% endif %}
            {% endif %}
        </td>
        <td>
          {% if f['remotely_exp'] is none %}
            unknown
          {% elif f['remotely_exp'] %}
            yes
          {% elif not f['remotely_exp'] %}
            no
          {% endif %}
        </td>
        <td>
          {% if f['urgency'] == "" %}
            unknown
          {% else %}
            {{ f['urgency'] }}
          {% endif %}
        </td>
        <td>
          {{ f['os_type'] }} {{ f['os_version'] }}
        </td>
        <td>
          {% if f['skipped'] == False %}
          <div rel="tooltip" title="Clic to skip">
            <button class="btn btn-primary btn-xs" onclick="skip('{{ f['bin_package'] }}', '{{ f['bin_version'] }}');">false</button>
          </div>
          {% elif f['skipped'] == True %}
          <div rel="tooltip" title="Clic to unskip">
            <button rel="tooltip" title="Clic to unskip"  class="btn btn-primary btn-xs" onclick="unskip('{{ f['bin_package'] }}', '{{ f['bin_version'] }}');">true</button>
          </div>
          {% endif %}
        </td>
      </tr>
    {% endfor %}
  </tbody>
</table>
<a href="#" class="back-to-top">Back to Top</a>
<a href="#" class="select-submit">Mark selected</a>
