#64 explorer draft view

This commit is contained in:
Leonhard Strohmidel
2022-09-25 18:02:59 +02:00
parent 724c26c926
commit df67bcf639
5 changed files with 80 additions and 3 deletions

View File

@@ -0,0 +1,28 @@
{% extends 'global.html'%}
{% load static %}
{% load i18n %}
{% load svg_icon %}
{% block maincontent %}
<section class="LP-Section">
<div class="LP-PlaceList">
<h1 class="LP-Headline">
{% if user.username == explorer.user.username %}
{% translate 'Your drafts' %}
{% else %}
{{explorer.user.username}}{% translate '\'s drafts' %}
{% endif %}
</h1>
<ul class="LP-PlaceList__List">
{% for place in place_list %}
<li class="LP-PlaceList__Item">
<a href="{% url 'place_detail' pk=place.pk %}" class="LP-Link">
{% include 'partials/place_teaser.html' with place=place extended=True %}
</a>
</li>
{% endfor %}
</ul>
</div>
</section>
{% endblock maincontent %}

View File

@@ -32,7 +32,8 @@
{% if user.is_authenticated %}
Hi {{ user.username }}!
<a class="LP-Link" href="{% url 'logout' %}"><span class="LP-Link__Text">{% translate 'Logout' %}</span></a> |
<a class="LP-Link" href="{% url 'explorer_profile' explorer_id=user.pk%}"><span class="LP-Link__Text">{% translate 'Profile' %}</span></a>
<a class="LP-Link" href="{% url 'explorer_profile' explorer_id=user.pk%}"><span class="LP-Link__Text">{% translate 'Profile' %}</span></a> |
<a class="LP-Link" href="{% url 'explorer_drafts' explorer_id=user.pk%}"><span class="LP-Link__Text">{% translate 'Drafts' %}</span></a>
{% if user.is_superuser %}
| <a class="LP-Link" href="{% url 'admin:index' %}" target="_blank"><span class="LP-Link__Text">{% translate 'Admin' %}</span></a>
{% endif %}