{% extends 'generic/object.html' %}
{% load buttons %}
{% load custom_links %}
{% load helpers %}
{% load perms %}
{% load plugins %}
{% load static %}
{% load i18n %}

{% block breadcrumbs %}
{% endblock %}

{% block control-buttons %}
  {% if not object.pk or object.is_active and perms.core.add_configrevision %}
    {% url 'core:configrevision_add' as edit_url %}
    {% include "buttons/edit.html" with url=edit_url %}
  {% endif %}
  {% if object.pk and not object.is_active and perms.core.delete_configrevision %}
    {% delete_button object %}
  {% endif %}
{% endblock control-buttons %}

{% block subtitle %}
  {% if object.created %}
    <div class="text-secondary fs-5">
      {% trans "Created" %} {{ object.created|isodatetime }}
    </div>
  {% endif %}
{% endblock subtitle %}

{% block content %}
  <div class="row">
    <div class="col col-md-12">
      <div class="card">
        <h2 class="card-header">{% trans "Configuration Data" %}</h2>
        {% include 'core/inc/config_data.html' with config=object.data %}
      </div>

      <div class="card">
        <h2 class="card-header">{% trans "Comment" %}</h2>
        <div class="card-body">
          {{ object.comment|placeholder }}
        </div>
      </div>

    </div>
  </div>
{% endblock %}
