{% load applicationcontent_tags i18n %}

{% include "widget/_common.html" %}

<div id="{{ widget.fe_identifier }}" class="fe_box leonardo-widget leonardo-{{ widget.widget_name }}-widget {{ widget.render_box_classes }}">
  {% if request.frontend_editing %}
  <a class="ajax-modal" href="{% url 'widget_update' widget.model_cls widget.id %}">{% trans 'Edit' %}</a>
  <a class="ajax-modal" href="{% url 'widget_delete' widget.model_cls widget.id %}">{% trans 'Delete' %}</a>
  {% endif %}
  <div class="ui-helper-clearfix leonardo-content template-{{ widget.theme.label }} {{ widget.widget_name }}-{{ widget.theme.label }}">
    {% block title %}
    {% if widget.label %}
    <a id="{{ widget.label|slugify }}"></a>
    <h2 class="widget-title"><span>{{ widget.label }}</span></h2>
    {% endif %}
    {% endblock %}
    {% block content %}{% endblock %}
  </div>
</div>
