{% set context = context ?? 'index' %}
{% apply spaceless %}
  {% for element in elements %}
    {% tag 'li' with {
      class: (element.isProvisionalDraft ? element.getCanonicalId() : element.id) in disabledElementIds ? 'disabled' : null,
      data: {
        id: element.id,
      },
    } %}
      {{ elementCard(element, {
        context,
        selectable,
        sortable,
        hyperlink: context == 'index',
      }) }}
    {% endtag %}
  {% endfor %}
{% endapply -%}
