{% load i18n l10n cms_tags cms_admin %}
<div class="cms-dragbar cms-dragbar-{{ placeholder.pk|unlocalize }}">
    {% if object_is_immutable %}
        <div class="cms-submenu-btn cms-submenu-edit-obj cms-btn">
            <a href="{% get_edit_url placeholder.source %}" class="cms-hover-tooltip cms-hover-tooltip-left cms-hover-tooltip-delay" data-cms-tooltip="{{ placeholder.edit_message }}"></a>
        </div>
    {% else %}
        <div class="cms-submenu-btn cms-submenu-add cms-btn">
            <span class="cms-hover-tooltip cms-hover-tooltip-left cms-hover-tooltip-delay" data-cms-tooltip="{% translate "Add plugin" %}"></span>
        </div>
    {% endif %}
    <div class="cms-submenu-settings cms-submenu-btn cms-btn"></div>
    <div class="cms-submenu-dropdown cms-submenu-dropdown-settings" data-touch-action="pan-y">
        <div class="cms-dropdown-inner">
            {% if placeholder.is_static %}
                <div class="cms-submenu-item">
                    <a data-cms-icon="edit" href="{% get_edit_url placeholder.source %}">{{ placeholder.edit_message }}</a>
                </div>
            {% endif %}
            <div class="cms-submenu-item"><a data-cms-icon="copy" data-rel="copy" href="#">{% translate "Copy all" %}</a></div>
            {% for language in placeholder.get_filled_languages %}{% if language.code != LANGUAGE_CODE %}
                <div class="cms-submenu-item"><a data-cms-icon="copy" data-rel="copy-lang" data-language="{{ language.code }}" href="#">{% translate "Copy from" %} {% translate language.name %}</a></div>
            {% endif %}{% endfor %}
            {% if object_is_immutable %}
                <div class="cms-submenu-item cms-submenu-item-disabled"><a data-cms-icon="paste" href="#">{% translate "Paste" %}</a></div>
                <div class="cms-submenu-item cms-submenu-item-disabled"><a data-cms-icon="bin" href="#">{% translate "Empty all" %}</a></div>
            {% else %}
                <div class="cms-submenu-item"><a data-cms-icon="paste" data-rel="paste" href="#">{% translate "Paste" %}</a></div>
                <div class="cms-submenu-item"><a data-cms-icon="bin" data-rel="modal" href="{% url "admin:cms_placeholder_clear_placeholder" placeholder.id %}" data-name="{{ placeholder.get_label }}">{% translate "Empty all" %}</a></div>
            {% endif %}
            {% render_extra_menu_items placeholder %}
        </div>
    </div>
    <div class="cms-plugin-picker" data-touch-action="pan-y">
        <div class="cms-quicksearch"><label><input type="text" placeholder="{% trans 'Filter plugins...' %}" /></label></div>
        {# plugin child classes here #}
    </div>

    <div class="cms-dragbar-title" title="{{ placeholder.get_label }}">
        {{ placeholder.get_label }}
        {% if placeholder.is_static %}<span class="cms-hover-tooltip cms-hover-tooltip-right" tabindex="-1" data-cms-tooltip="{{ placeholder.static_message }}"><span class="cms-icon cms-icon-external-placeholder cms-dragarea-static-icon"></span></span>{% endif %}
        <span class="cms-dragbar-toggler">
            <a href="#" class="cms-dragbar-expand-all" tabindex="-1">{% translate "Expand all" %}</a>
            <a href="#" class="cms-dragbar-collapse-all" tabindex="-1">{% translate "Collapse all" %}</a>
        </span>
    </div>
</div>
