{% load i18n wagtailadmin_tags %}
{% if allow_external_link or allow_email_link or current == 'external' or current == 'email' %}
    <p class="link-types">
        {% if current == 'internal' %}
            <b>{% trans "Internal link" %}</b>
        {% else %}
            {% if parent_page_id %}
                <a href="{% url 'wagtailadmin_choose_page_child' parent_page_id %}{% querystring p=None parent_page_id=None %}">{% trans "Internal link" %}</a>
            {% else %}
                <a href="{% url 'wagtailadmin_choose_page' %}{% querystring p=None parent_page_id=None %}">{% trans "Internal link" %}</a>
            {% endif %}
        {% endif %}

        {% if current == 'external' %}
            | <b>{% trans "External link" %}</b>
        {% elif allow_external_link %}
            | <a href="{% url 'wagtailadmin_choose_page_external_link' %}{% querystring p=None parent_page_id=parent_page_id %}">{% trans "External link" %}</a>
        {% endif %}

        {% if current == 'email' %}
            | <b>{% trans "Email link" %}</b>
        {% elif allow_email_link %}
            | <a href="{% url 'wagtailadmin_choose_page_email_link' %}{% querystring p=None parent_page_id=parent_page_id %}">{% trans "Email link" %}</a>
        {% endif %}
    </p>
{% endif %}
