Add write link to header and reorder links

This commit is contained in:
Gabriel Augendre 2020-11-11 12:07:19 +01:00
parent 48f9a2e468
commit 524c42544d
No known key found for this signature in database
GPG key ID: 1E693F4CE4AEE7B4

View file

@ -16,15 +16,18 @@
<body> <body>
<nav> <nav>
<a href="{% url 'articles-list' %}">Articles list</a> <a href="{% url 'articles-list' %}">Articles list</a>
| &centerdot;
{% if user.is_authenticated %} {% if user.is_authenticated %}
<a href="{% url 'admin:articles_article_add' %}">Write</a>
<a href="{% url 'drafts-list' %}">View drafts <span class="pill">{{ drafts_count }}</span></a> <a href="{% url 'drafts-list' %}">View drafts <span class="pill">{{ drafts_count }}</span></a>
&centerdot;
<a href="{% url 'admin:index' %}">Admin</a> <a href="{% url 'admin:index' %}">Admin</a>
<a href="{% url 'admin:logout' %}?next=/">Log out</a>
{% else %} {% else %}
<a href="{% url 'admin:login' %}?next=/">Log in</a> <a href="{% url 'admin:login' %}?next=/">Log in</a>
{% endif %} {% endif %}
{% if pages %} {% if pages %}
| &centerdot;
{% for page in pages %} {% for page in pages %}
<a href="{% url 'article-detail' slug=page.slug %}">{{ page.title }}</a> <a href="{% url 'article-detail' slug=page.slug %}">{{ page.title }}</a>
{% endfor %} {% endfor %}