{% load i18n wagtailadmin_tags %}

{# The title field for a page in the page listing, when in 'explore' mode #}

<div class="title-wrapper">
  {% if page.is_site_root %}
    {% if perms.wagtailcore.add_site or perms.wagtailcore.change_site or perms.wagtailcore.delete_site %}
      <a href="{% url 'wagtailsites:index' %}" class="icon icon-site" title="{% trans 'Sites menu' %}"></a>
    {% endif %}
  {% endif %}

  {% if page_perms.can_edit %}
    <a href="{% url 'wagtailadmin_pages:edit' page.id %}"
       title="{% trans 'Edit this page' %}">
      {% if page.get_admin_display_title_html %}
      {% autoescape off %}{{ page.get_admin_display_title_html }}{% endautoescape %}
      {% else %}
        {{ page.get_admin_display_title }}
      {% endif %}
    </a>

  <a href="/cms/pages/124/edit/"
     title="Edit this page">
  </a>
  {% else %}
    {{ page.get_admin_display_title }}
  {% endif %}

  {% if show_locale_labels %}
    <span class="status-tag status-tag--label">{{ page.locale.get_display_name }}</span>
  {% endif %}

  {% block pages_listing_title_extra %}{% endblock pages_listing_title_extra %}

  {% include "wagtailadmin/pages/listing/_privacy_indicator.html" with page=page %}
  {% include "wagtailadmin/pages/listing/_locked_indicator.html" with page=page %}
</div>

<ul class="actions">
  {% page_listing_buttons page page_perms %}
</ul>
