{% load i18n %}
{% load ooi_extra %}

<nav class="tabs" aria-label="{% translate 'List of views for OOI' %}">
  <ul>
    <li {% if view == 'ooi_detail' %} aria-current="page"{% endif %}>
      <a href="{% ooi_url 'ooi_detail' ooi.primary_key query=mandatory_fields %}">{% translate 'Overview' %}</a>
    </li>
    <li {% if view == 'ooi_tree' %} aria-current="page"{% endif %}>
      <a href="{% ooi_url 'ooi_tree' ooi.primary_key query=mandatory_fields %}">{% translate 'Tree' %}</a>
    </li>
    <li {% if view == 'graph' %} aria-current="page"{% endif %}>
      <a href="{% ooi_url 'ooi_graph' ooi.primary_key query=mandatory_fields %}">{% translate 'Graph' %}</a>
    </li>
    {% if not ooi|is_finding and not ooi|is_finding_type %}
      <li {% if view == 'scan_profile_detail' %} aria-current="page"{% endif %}>
        {% if scan_profile %}
          <a href="{% url 'scan_profile_detail' scan_profile.id %}?ooi_id={{ ooi_id }}{% include 'partials/elements/href_querystring_from_list.html' with list=mandatory_fields %}">{% translate 'Clearance level' %} ({{ scan_profile.get_scan_level }}</a>
        {% endif %}
        <a href="{% ooi_url 'scan_profile_detail' ooi.primary_key %}&{% include 'partials/elements/href_querystring_from_list.html' with list=mandatory_fields %}">{% translate 'Clearance level' %} ({{ ooi.scan_profile.human_readable }}, {{ ooi.scan_profile.scan_profile_type }})</a>
      </li>
      <li {% if view == 'ooi_findings' %} aria-current="page"{% endif %}>
        <a href="{% ooi_url 'ooi_findings' ooi.primary_key query=mandatory_fields %}">{% translate 'Findings' %}</a>
      </li>
    {% endif %}
  </ul>
</nav>
