{% extends 'nova/base.html' %}
{% load i18n %}

{% block page_header %}
  {% include "horizon/common/_page_header.html" with title=_("Security Groups") %}
{% endblock page_header %}

{% block dash_main %}
  {% if security_groups %}
    {% include 'nova/security_groups/_list.html' %}
    {% url horizon:nova:security_groups:create as create_sec_url %}
    <a id="security_groups_create_link" class="btn small" href="{{ create_sec_url }}" data-controls-modal="create_security_group_modal" data-backdrop="static">{% trans "Create Security Group" %}</a>
  {% else %}
    <div class="message_box info">
      {% url horizon:nova:security_groups:create as dash_sec_url %}
      <h2>{% trans "Info"%}</h2>
      <p>{% blocktrans %}There are currently no security groups. <a href='{{ dash_sec_url }}' data-controls-modal="create_security_group_modal" data-backdrop="static">Create A Security Group</a>{% endblocktrans %}</p>
    </div>
  {% endif %}

  {% include 'nova/security_groups/_create.html' with form=form hide=True%}

{% endblock %}
