module.html 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. {% load i18n %}
  2. <div class="dashboard-item{% if module.collapsible %} collapsible{% endif %}{% if module.model.collapsed %} collapsed{% endif %}{% if module.deletable %} deletable{% endif %}{% if module.ajax_load %} ajax{% endif %}"{% if module.ajax_load %} data-ajax-url="{% url "jet-dashboard:load_dashboard_module" pk=module.model.id %}"{% endif %} data-module-id="{{ module.model.id }}">
  3. <div class="dashboard-item-header">
  4. <span class="dashboard-item-header-drag icon-grid"></span>
  5. <span class="dashboard-item-header-title">
  6. {% if module.collapsible %}
  7. <a href="#" class="dashboard-item-collapse"><span class="dashboard-item-header-collapse-button icon-arrow-down"></span></a>
  8. <a href="#" class="dashboard-item-collapse"><span class="dashboard-item-header-collapse-button icon-arrow-up"></span></a>
  9. {% endif %}
  10. {% if module.title_url %}
  11. <a href="{{ module.title_url }}">{{ module.title }}</a>
  12. {% else %}
  13. {{ module.title }}
  14. {% endif %}
  15. <span class="dashboard-item-header-buttons">
  16. <a href="{% url "jet-dashboard:update_module" pk=module.model.id %}" title="{% trans "Change" %}"><span class="icon-edit"></span></a>
  17. {% if module.deletable %}
  18. <a href="#" title="{% trans "Delete" %}" class="dashboard-item-remove"><span class="icon-cross"></span></a>
  19. {% endif %}
  20. </span>
  21. </span>
  22. </div>
  23. <div class="dashboard-item-content{% if module.contrast %} contrast{% endif %}"{% if module.style %} style="{{ module.style }}"{% endif %}>
  24. {% if module.ajax_load %}
  25. <div class="loading-indicator-wrapper">
  26. <span class="icon-refresh loading-indicator"></span>
  27. </div>
  28. {% else %}
  29. {{ module.render }}
  30. {% endif %}
  31. </div>
  32. </div>