{% extends "includes/crud/table_list.html" %} {% load trans blocktrans from i18n %} {% block top_left_menu_items %}
{% include "includes/filters/form.html" with fields=filter.form %}
{% endblock top_left_menu_items %} {% block create_button %} {% url "projects_redirects_create" project_slug=project.slug as create_url %} {% trans "Add redirect" as create_text %} {% include "includes/crud/create_button.html" with url=create_url text=create_text %} {% endblock create_button %} {% block list_placeholder_icon_class %} fa-duotone fa-signs-post {% endblock list_placeholder_icon_class %} {% block list_placeholder_header %} {% blocktrans trimmed %} No redirects exist yet {% endblocktrans %}
{% trans "Redirects allow you to fix links to pages that have moved." %}
{% endblock list_placeholder_header %} {% block list_placeholder_text %} {% trans "Learn more" %} {% endblock list_placeholder_text %} {% block list_item_right_buttons %} {% trans "Move up" as button_up_text %} {% trans "Move down" as button_down_text %} {% if not forloop.first %} {% endif %} {% if not forloop.last %} {% endif %} {% url "projects_redirects_delete" project_slug=project.slug redirect_pk=object.pk as form_url %} {% trans "Remove redirect" as action_text %} {% blocktrans trimmed asvar content_text with redirect=object %} Remove redirect {{ redirect }}? {% endblocktrans %} {% include "includes/crud/remove_button.html" with id=object.pk form_url=form_url action_text=action_text content_text=content_text %} {% endblock list_item_right_buttons %} {% block list_item_image %} {% endblock list_item_image %} {% block list_item_header %} {% spaceless %} {% if object.from_url %} {% if object.redirect_type == "page" %} /$lang /$version {% endif %} {{ object.from_url }} {% else %} {% if object.redirect_type == "clean_url_to_html" %} /**/$1/ {% elif object.redirect_type == "clean_url_without_trailing_slash_to_html" %} /**/$1 {% elif object.redirect_type == "html_to_clean_url" %} /**/$1.html {% endif %} {% endif %} {% endspaceless %}
{% spaceless %} {% if object.from_url %} {% if object.redirect_type == "page" %} /$lang /$version {% endif %} {{ object.to_url }} {% else %} {% if object.redirect_type == "clean_url_to_html" %} /**/$1.html {% elif object.redirect_type == "clean_url_without_trailing_slash_to_html" %} /**/$1.html {% elif object.redirect_type == "html_to_clean_url" %} /**/$1/ {% endif %} {% endif %} {% endspaceless %}
{% endblock list_item_header %} {% block list_item_meta_column %} {% endblock list_item_meta_column %} {% block list_item_extra_column %} {% endblock list_item_extra_column %}