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>
<nav>
<a href="{% url 'articles-list' %}">Articles list</a>
|
&centerdot;
{% 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>
&centerdot;
<a href="{% url 'admin:index' %}">Admin</a>
<a href="{% url 'admin:logout' %}?next=/">Log out</a>
{% else %}
<a href="{% url 'admin:login' %}?next=/">Log in</a>
{% endif %}
{% if pages %}
|
&centerdot;
{% for page in pages %}
<a href="{% url 'article-detail' slug=page.slug %}">{{ page.title }}</a>
{% endfor %}