export.html 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. {% load i18n %}
  2. <div class="dropdown">
  3. <button type="button" class="btn btn-purple dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  4. <i class="mdi mdi-download"></i> {% trans "Export" %}
  5. </button>
  6. <ul class="dropdown-menu dropdown-menu-end">
  7. <li><a id="export_current_view" class="dropdown-item" href="?{% if url_params %}{{ url_params }}&{% endif %}export=table">{% trans "Current View" %}</a></li>
  8. <li><a class="dropdown-item" href="?{% if url_params %}{{ url_params }}&{% endif %}export">{% trans "All Data" %} ({{ data_format }})</a></li>
  9. {% if export_templates %}
  10. <li>
  11. <hr class="dropdown-divider">
  12. </li>
  13. {% for et in export_templates %}
  14. <li>
  15. <a class="dropdown-item" href="?{% if url_params %}{{ url_params }}&{% endif %}export={{ et.name }}"
  16. {% if et.description %} title="{{ et.description }}"{% endif %}
  17. >
  18. {{ et.name }}
  19. </a>
  20. </li>
  21. {% endfor %}
  22. {% endif %}
  23. {% if perms.extras.add_exporttemplate %}
  24. <li>
  25. <hr class="dropdown-divider">
  26. </li>
  27. <li>
  28. <a class="dropdown-item" href="{% url 'extras:exporttemplate_add' %}?object_types={{ object_type.pk }}">{% trans "Add export template" %}...</a>
  29. </li>
  30. {% endif %}
  31. </ul>
  32. </div>