module.html 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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-buttons">
  6. <a href="{% url "jet-dashboard:update_module" pk=module.model.id %}" title="{% trans "Change" %}"><span class="icon-edit"></span></a>
  7. {% if module.deletable %}
  8. <a href="#" title="{% trans "Delete" %}" class="dashboard-item-remove"><span class="icon-cross"></span></a>
  9. {% endif %}
  10. </span>
  11. <span class="dashboard-item-header-title">
  12. {% if module.collapsible %}
  13. <a href="#" class="dashboard-item-collapse"><span class="dashboard-item-header-collapse-button icon-arrow-down"></span></a>
  14. <a href="#" class="dashboard-item-collapse"><span class="dashboard-item-header-collapse-button icon-arrow-up"></span></a>
  15. {% endif %}
  16. {% if module.title_url %}
  17. <a href="{{ module.title_url }}">{{ module.title }}</a>
  18. {% else %}
  19. {{ module.title }}
  20. {% endif %}
  21. </span>
  22. <div class="cf"></div>
  23. </div>
  24. <div class="dashboard-item-content{% if module.contrast %} contrast{% endif %}"{% if module.style %} style="{{ module.style }}"{% endif %}>
  25. {{ module.pre_contenta|default_if_none:"" }}
  26. {% if module.ajax_load %}
  27. <div class="loading-indicator-wrapper">
  28. <span class="icon-refresh loading-indicator"></span>
  29. </div>
  30. {% else %}
  31. {{ module.render }}
  32. {% endif %}
  33. {{ module.post_content|default_if_none:"" }}
  34. </div>
  35. </div>