manager: mention on home page is a page is a redirection (#51476)
This commit is contained in:
parent
cb8019bee7
commit
0fd79d4c0a
|
@ -95,6 +95,11 @@ div.page .group1 {
|
|||
flex: 1;
|
||||
}
|
||||
|
||||
div.page .group1 small {
|
||||
font-size: 80%;
|
||||
color: #3c3c33;
|
||||
}
|
||||
|
||||
div.cell h3 span.extra-css-class {
|
||||
font-size: 70%;
|
||||
opacity: 0.7;
|
||||
|
|
|
@ -32,7 +32,10 @@ Use drag and drop with the ⣿ handles to reorder and change hierarchy of pages.
|
|||
<div class="page level-{{page.level}}{% if collapse_pages %} untoggled{% endif %}" data-page-id="{{page.id}}" data-level="{{page.level}}">
|
||||
<span class="handle">⣿</span>
|
||||
<span class="group1">
|
||||
<a href="{% url 'combo-manager-page-view' pk=page.id %}">{{ page.title }}</a>
|
||||
<a href="{% url 'combo-manager-page-view' pk=page.id %}">
|
||||
{{ page.title }}
|
||||
{% if page.redirect_url %} <small>({% trans "redirection" %})</small>{% endif %}
|
||||
</a>
|
||||
</span>
|
||||
{% if not page.public %}
|
||||
<span class="visibility-summary" title="{% trans 'Restricted visibility' %}">
|
||||
|
|
|
@ -86,6 +86,19 @@ def test_pages_collapse(settings, app, admin_user, collapse):
|
|||
assert ('class="page level-0"' in resp.text) is not collapse
|
||||
|
||||
|
||||
def test_pages_redirection(app, admin_user):
|
||||
page = Page.objects.create(title='One', slug='one')
|
||||
|
||||
app = login(app)
|
||||
resp = app.get('/manage/')
|
||||
assert '(redirection)' not in resp
|
||||
|
||||
page.redirect_url = 'http://www.example.net'
|
||||
page.save()
|
||||
resp = app.get('/manage/')
|
||||
assert '(redirection)' in resp
|
||||
|
||||
|
||||
def test_add_page(app, admin_user):
|
||||
app = login(app)
|
||||
resp = app.get('/manage/', status=200)
|
||||
|
|
Loading…
Reference in New Issue