{% from "_includes/forms" import text -%} {% includeTranslations "Display in a table", "Display hierarchically", "Display as thumbnails" %} {% set context = context is defined ? context : 'index' %} {% set showStatusMenu = (showStatusMenu is defined and showStatusMenu != 'auto' ? showStatusMenu : elementType.hasStatuses()) %} {% set showLocaleMenu = (craft.isLocalized() and context == 'index' ? (showLocaleMenu is defined and showLocaleMenu != 'auto' ? showLocaleMenu : elementType.isLocalized()) : false) %}
{% if showStatusMenu %} {% endif %} {% if showLocaleMenu %} {% set editableLocaleIds = craft.i18n.getEditableLocaleIds() %} {% if editableLocaleIds|length %} {% if craft.locale in editableLocaleIds %} {% set initialLocale = craft.i18n.getCurrentLocale() %} {% else %} {% set initialLocale = craft.i18n.getLocaleById(editableLocaleIds|first) %} {% endif %} {% endif %} {% endif %}