{#
 # For the full copyright and license information, please view the
 # docs/licenses/LICENSE.txt file that was distributed with this source code.
 #}

{% if this.confirmationMessage is not empty %}
<div class="bootstrap">
  <div class="alert alert-success">
    <button type="button" class="close" data-dismiss="alert">&times;</button>
    {{ this.confirmationMessage }}
  </div>
</div>
{% endif %}

{% if this.errorMessage is not empty %}
<div class="bootstrap">
  <div class="alert alert-danger">
    <button type="button" class="close" data-dismiss="alert">&times;</button>
    {{ this.errorMessage }}
  </div>
</div>
{% endif %}

{% if this.errors is not empty %}
<div class="bootstrap">
  <div class="alert alert-danger">
    <button type="button" class="close" data-dismiss="alert">&times;</button>
    {% if this.errors|length == 1 %}
      {{ this.errors|first }}
    {% else %}
      {{ 'There are %d errors.'|trans({'%d': this.errors|length}, 'Admin.Notifications.Error') }}
      <br/>
      <ol>
        {% for error in this.errors %}
        <li>{{ error }}</li>
        {% endfor %}
      </ol>
    {% endif %}
  </div>
</div>
{% endif %}

{% if this.informations is not empty %}
<div class="bootstrap">
  <div class="alert alert-info">
    <button type="button" class="close" data-dismiss="alert">&times;</button>
    <ul id="infos_block" class="list-unstyled">
      {% for info in this.informations %}
      <li>{{ info|raw_purified }}</li>
      {% endfor %}
    </ul>
  </div>
</div>
{% endif %}

{% if this.confirmations is not empty %}
<div class="bootstrap">
  <div class="alert alert-success" style="display:block;">
    {% for confirmation in this.confirmations %}
    {{ confirmation }}
    {% endfor %}
  </div>
</div>
{% endif %}

{% if this.warnings is not empty %}
<div class="bootstrap">
  <div class="alert alert-warning">
    <button type="button" class="close" data-dismiss="alert">&times;</button>
    {% if this.warnings|length > 1 %}
    <h4>{{ 'There are %d warnings:'|trans({'%d': this.warnings|length}) }}</h4>
    {% endif %}
    <ul class="list-unstyled">
      {% for warning in this.warnings %}
      <li>{{ warning|raw_purified }}</li>
      {% endfor %}
    </ul>
  </div>
</div>
{% endif %}
