{% extends 'projectroles/base.html' %}

{# Projectroles dependency #}
{% load projectroles_common_tags %}

{% load rules %}

{% block title %}Admin Alert{% endblock %}

{% block projectroles %}

<div class="row sodar-subtitle-container">
  <h2><i class="iconify" data-icon="mdi:alert"></i> Admin Alert</h2>
  <a role="button" class="btn btn-secondary ml-auto pull-right"
     href="{{ request.session.real_referer }}">
    <i class="iconify" data-icon="mdi:arrow-left-circle"></i> Back
  </a>
</div>

<div class="container-fluid sodar-page-container">
  <div class="card" id="sodar-aa-alert-list">
    <div class="card-body px-0">
      <dl class="row pb-0">
        <dt class="col-md-2">Message</dt>
        <dd class="col-md-10"><strong>{{ object.message }}</strong></dd>
        <dt class="col-md-2">Created</dt>
        <dd class="col-md-10">{{ object.date_created|date:'Y-m-d H:i' }}</dd>
        <dt class="col-md-2">Expires</dt>
        <dd class="col-md-10">{{ object.date_expire|date:'Y-m-d' }}</dd>
        <dt class="col-md-2">Last Edited By</dt>
        <dd class="col-md-10">{{ object.user.get_display_name }}</dd>
        {% if object.description.raw %}
          <dd class="col-md-12 px-0 mx-0 mb-0">
            <hr />
          </dd>
          <dd class="col-md-12 my-0 sodar-markdown-content">
            {% render_markdown object.description.raw as desc %}
            {{ desc | safe }}
          </dd>
        {% endif %}
      </dl>
    </div>
  </div>
</div>

{% endblock projectroles %}
