lostplaces-backend/django_lostplaces/lostplaces/templates/explorer/profile.html

159 lines
6.1 KiB
HTML
Raw Normal View History

2020-11-29 19:22:55 +01:00
{% extends 'global.html'%}
{% load static %}
{% load i18n %}
{% load svg_icon %}
{% block maincontent %}
<div class="LP-UserProfile">
<div class="LP-UserProfile__Bio">
<h2 class="LP-Headline">Bio</h2>
<p class="LP-Paragraph">{{explorer.bio}}</p>
</div>
2020-11-29 19:22:55 +01:00
<div class="LP-UserProfile__Info">
<div class="LP-UserInfo">
<div class="LP-UserInfo__UserName">
<h1 class="LP-Headline">{{explorer.user.username}}</h1>
</div>
2020-11-29 19:22:55 +01:00
<div class="LP-UserInfo__Meta">
<table>
<tr>
{% if explorer.profile_image %}
<figure class="LP-UserInfo__Image">
<img src="{{ explorer.profile_image.url }}" class="LP-Image" />
</figure>
{% endif %}
2020-12-24 15:33:46 +01:00
<tr>
{% if explorer.user.first_name %}
2020-12-24 15:33:46 +01:00
<td class="LP-UserInfo__Key">
<span class="LP-Paragraph">{% trans 'Name' %}</span>
</td>
<td class="LP-UserInfo__Value">
<span class="LP-Paragraph">{{explorer.user.first_name}} {{explorer.user.last_name}}</span>
</td>
{% endif %}
2020-12-24 15:33:46 +01:00
</tr>
<tr>
{% if explorer.user.email %}
<td class="LP-UserInfo__Key">
2020-12-25 01:28:23 +01:00
<span class="LP-Paragraph">{% trans 'E-mail' %}</span>
2020-12-24 15:33:46 +01:00
</td>
<td class="LP-UserInfo__Value">
<span class="LP-Paragraph">
2020-12-25 18:07:54 +01:00
<a href="mailto:{{explorer.user.email}}" class="LP-Link">{{explorer.user.email}}</a>
</span>
2020-12-24 15:33:46 +01:00
</td>
{% endif %}
2020-12-24 15:33:46 +01:00
</tr>
2020-11-29 19:22:55 +01:00
<tr>
<td class="LP-UserInfo__Key">
<span class="LP-Paragraph">{% trans 'Joined' %}</span>
</td>
<td class="LP-UserInfo__Value">
<span class="LP-Paragraph">{{explorer.user.date_joined|date:'d.m.Y'}}</span>
</td>
</tr>
<tr>
<td class="LP-UserInfo__Key">
<span class="LP-Paragraph">{% trans 'Places'%}</span>
</td>
<td class="LP-UserInfo__Value">
<span class="LP-Paragraph">{{place_count}}</span>
</td>
</tr>
<tr>
<td class="LP-UserInfo__Key">
2020-12-25 01:28:23 +01:00
<span class="LP-Paragraph">{% trans 'Place assets'%}</span>
2020-11-29 19:22:55 +01:00
</td>
<td class="LP-UserInfo__Value">
<span class="LP-Paragraph">{{asset_count}}</span>
</td>
</tr>
</table>
2020-12-25 18:07:54 +01:00
<div class="LP-UserInfo__Edit">
<a href="{% url 'explorer_profile_update' %}" class="LP-Button LP-Button--fullWidth LP-Link">{% trans 'Edit Profile' %}</a>
</div>
2020-11-29 19:22:55 +01:00
</div>
</div>
</div>
</div>
<section class="LP-Section">
<div class="LP-PlaceList">
<h1 class="LP-Headline">{% trans 'Favorite places' %}</h1>
<ul class="LP-PlaceList__List">
{% for place in explorer.favorite_places.all %}
<li class="LP-PlaceList__Item">
{% include 'partials/place_teaser.html' with place=place extended=True %}
</li>
{% endfor %}
</ul>
{% include 'partials/nav/pagination.html' %}
</div>
</section>
2020-11-29 19:22:55 +01:00
<section class="LP-Section">
2020-12-24 16:43:01 +01:00
<div class="LP-PlaceList">
<h1 class="LP-Headline">{% trans 'Places submitted by' %} {{explorer.user.username}}</h1>
<ul class="LP-PlaceList__List">
{% for place in place_list %}
<li class="LP-PlaceList__Item">
{% include 'partials/place_teaser.html' with place=place extended=True %}
</li>
{% endfor %}
</ul>
2020-11-29 19:22:55 +01:00
2020-12-24 16:43:01 +01:00
{% include 'partials/nav/pagination.html' %}
2020-11-29 19:22:55 +01:00
2020-12-24 16:43:01 +01:00
</div>
2020-11-29 19:22:55 +01:00
</section>
<section class="LP-Section">
2020-12-24 16:43:01 +01:00
<h1 class="LP-Headline">{% trans 'Images submitted by' %} {{explorer.user.username}}</h1>
<div class="LP-ImageGrid">
<ul class="LP-ImageGrid__Container">
{% for place_image in assets.placeimages.all %}
<li class="LP-ImageGrid__Item">
<a href="{{ place_image.filename.large.url }}" class="LP-Link">
<img class="LP-Image" src="{{ place_image.filename.thumbnail.url }}">
</a>
{% if user.explorer == place_image.submitted_by%}
<span class="LP-ImageGrid__DeleteItem" title="Bild löschen">
<a href="{% url 'place_image_delete' pk=place_image.id %}" class="LP-Link">
<img class="LP-Icon" src="{% static 'icons/cancel.svg' %}" />
</a>
</span>
{% endif %}
</li>
{% endfor %}
</ul>
</div>
2020-11-29 19:22:55 +01:00
</section>
<section class=" LP-Section">
2020-12-24 16:43:01 +01:00
<h1 class="LP-Headline">{% trans 'Photo albums submitted by' %} {{explorer.user.username}}</h1>
<div class="LP-LinkList">
<ul class="LP-LinkList__Container">
{% for photo_album in assets.photoalbums.all %}
<li class="LP-LinkList__Item">
<a target="_blank" href="{{photo_album.url}}" class="LP-Link">
<span class="LP-Text">{{photo_album.label}}</span>
</a>
{% if user.explorer == photo_album.submitted_by%}
<a href="{% url 'photo_album_delete' pk=photo_album.pk%}" class="LP-Link LP-LinkList__ItemHover" title="Delete Photo Album">
<div class="RV-Iconized__Container RV-Iconized__Container--small">
{% icon 'trash' className="RV-Iconized__Icon" %}
</div>
</a>
{% endif %}
</li>
{% endfor %}
</ul>
</div>
2020-11-29 19:22:55 +01:00
</section>
{% endblock maincontent %}