manager: mention on home page is a page is a redirection (#51476)
gitea-wip/combo/pipeline/head Build started... Details
gitea/combo/pipeline/head Build started... Details

This commit is contained in:
Lauréline Guérin 2021-03-01 14:41:35 +01:00
parent cb8019bee7
commit 0fd79d4c0a
No known key found for this signature in database
GPG Key ID: 1FAB9B9B4F93D473
3 changed files with 22 additions and 1 deletions

View File

@ -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;

View File

@ -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' %}">

View File

@ -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)