{% load djblets_utils %}
{% load staticfiles %}
<div class="admin-widget widget-collapsable widget-{{widget.size}}{% if widget.collapsed %} widget-hidden %}{% endif %}{% if widget.actions %} widget-has-actions{% endif %}" id="{{widget.name}}">
 <h1 class="widget-heading">
{% if widget.icon %}
  <img src="{% static widget.icon %}" alt="{{widget.title}}" width="14" height="14" />
{% endif %}
  {{widget.title}}<span class="btn-state"></span>
 </h1>
 <div class="widget-content">
  {% if widget.template %}
  {% include widget.template %}
  {% endif %}
 </div>
{% if widget.actions %}
 <div class="widget-actions">
{%  for action in widget.actions %}
  <a href="{{action.url|default:'#'}}"{% attr "class" %}{{action.classes}}{% endattr %}{% attr "id" %}{{action.id}}{% endattr %}{% attr "rel" %}{{action.rel}}{% endattr %}>{{action.label}}</a>
{%  endfor %}
 </div>
{% endif %}
</div>
