|
37 | 37 | {% endblock list_placeholder_text %}
|
38 | 38 |
|
39 | 39 | {% block list_item_right_buttons %}
|
| 40 | + {% trans "Move up" as button_up_text %} |
| 41 | + {% trans "Move down" as button_down_text %} |
| 42 | + {% if not forloop.first %} |
| 43 | + <button class="ui icon button" |
| 44 | + data-bind="click: $root.post_child_form" |
| 45 | + data-content="{{ button_up_text }}" |
| 46 | + aria-label="{{ button_up_text }}" |
| 47 | + title="{{ button_up_text }}"> |
| 48 | + <form method="post" action="{% url 'projects_redirects_insert' project_slug=project.slug redirect_pk=object.pk position=object.position|add:"-1" %}"> |
| 49 | + {% csrf_token %} |
| 50 | + </form> |
| 51 | + <i class="fa-solid fa-arrow-up icon"></i> |
| 52 | + </button> |
| 53 | + {% endif %} |
| 54 | + |
| 55 | + {% if not forloop.last %} |
| 56 | + <button class="ui icon button" |
| 57 | + data-bind="click: $root.post_child_form" |
| 58 | + data-content="{{ button_down_text }}" |
| 59 | + aria-label="{{ button_down_text }}" |
| 60 | + title="{{ button_down_text }}"> |
| 61 | + <form method="post" action="{% url 'projects_redirects_insert' project_slug=project.slug redirect_pk=object.pk position=object.position|add:"1" %}"> |
| 62 | + {% csrf_token %} |
| 63 | + </form> |
| 64 | + <i class="fa-solid fa-arrow-down icon"></i> |
| 65 | + </button> |
| 66 | + {% endif %} |
| 67 | + |
40 | 68 | <a class="ui button"
|
41 | 69 | href="{% url 'projects_redirects_edit' project_slug=project.slug redirect_pk=object.pk %}"
|
42 | 70 | data-content="{% trans "Edit redirect" %}">
|
|
79 | 107 | <span>/</span><span class="ui violet text">$version</span>
|
80 | 108 | {% endif %}
|
81 | 109 | <span>{{ object.from_url }}</span>
|
82 |
| - {% if object.redirect_type == "prefix" %} |
83 |
| - <span class="ui violet text">$1</span> |
84 |
| - {% endif %} |
85 | 110 | {% else %}
|
86 |
| - {% if object.redirect_type == "sphinx_html" %} |
| 111 | + {% if object.redirect_type == "clean_url_to_html" %} |
87 | 112 | <span>/**/</span><span class="ui violet text">$1</span><span>/</span>
|
88 |
| - {% elif object.redirect_type == "sphinx_htmldir" %} |
| 113 | + {% elif object.redirect_type == "html_to_clean_url" %} |
89 | 114 | <span>/**/</span><span class="ui violet text">$1</span><span>.html</span>
|
90 | 115 | {% endif %}
|
91 | 116 | {% endif %}
|
|
95 | 120 | <label>{% trans "Redirect to:" %}</label>
|
96 | 121 | {% spaceless %}
|
97 | 122 | {% if object.from_url %}
|
98 |
| - {% if object.redirect_type == "page" or object.redirect_type == "prefix" %} |
| 123 | + {% if object.redirect_type == "page" %} |
99 | 124 | <span>/</span><span class="ui violet text">$lang</span>
|
100 | 125 | <span>/</span><span class="ui violet text">$version</span>
|
101 |
| - {% if object.redirect_type == "prefix" %} |
102 |
| - <span>/</span><span class="ui violet text">$1</span> |
103 |
| - {% endif %} |
104 | 126 | {% endif %}
|
105 | 127 | <span>{{ object.to_url }}</span>
|
106 | 128 | {% else %}
|
107 |
| - {% if object.redirect_type == "sphinx_html" %} |
| 129 | + {% if object.redirect_type == "clean_url_to_html" %} |
108 | 130 | <span>/**/</span><span class="ui violet text">$1</span><span>.html</span>
|
109 |
| - {% elif object.redirect_type == "sphinx_htmldir" %} |
| 131 | + {% elif object.redirect_type == "html_to_clean_url" %} |
110 | 132 | <span>/**/</span><span class="ui violet text">$1</span><span>/</span>
|
111 | 133 | {% endif %}
|
112 | 134 | {% endif %}
|
|
0 commit comments