feat: Add user page to show adoption notices
This commit is contained in:
parent
bbb2d33840
commit
b16cf76208
@ -1,16 +0,0 @@
|
|||||||
{% extends "fellchensammlung/base_generic.html" %}
|
|
||||||
{% load i18n %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<h1>{{ member.user.get_full_name }}</h1>
|
|
||||||
|
|
||||||
<p><strong>{% translate "Username" %}:</strong> {{ member.user.username }}</p>
|
|
||||||
<p><strong>{% translate "E-Mail" %}:</strong> {{ member.user.email }}</p>
|
|
||||||
|
|
||||||
{% if member.preferred_language %}
|
|
||||||
<p><strong>{% translate "Sprache" %}:</strong> {{ member.preferred_language }}</p>
|
|
||||||
{% else %}
|
|
||||||
<p>{% translate "Keine bevorzugte Sprache gesetzt." %}</p>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% endblock %}
|
|
@ -0,0 +1,20 @@
|
|||||||
|
{% extends "fellchensammlung/base_generic.html" %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<h1>{{ user.get_full_name }}</h1>
|
||||||
|
|
||||||
|
<p><strong>{% translate "Username" %}:</strong> {{ user.username }}</p>
|
||||||
|
<p><strong>{% translate "E-Mail" %}:</strong> {{ user.email }}</p>
|
||||||
|
|
||||||
|
{% if user.preferred_language %}
|
||||||
|
<p><strong>{% translate "Sprache" %}:</strong> {{ user.preferred_language }}</p>
|
||||||
|
{% else %}
|
||||||
|
<p>{% translate "Keine bevorzugte Sprache gesetzt." %}</p>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if user.id is request.user.id %}
|
||||||
|
<h2>{% translate 'Meine Vermittlungen' %}</h2>
|
||||||
|
{% include "fellchensammlung/lists/list-adoption-notices.html" %}
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
@ -16,7 +16,7 @@
|
|||||||
<div class="header-right">
|
<div class="header-right">
|
||||||
{% if user.is_authenticated %}
|
{% if user.is_authenticated %}
|
||||||
<div class="profile-card">
|
<div class="profile-card">
|
||||||
<p>{{ user.username }}</p>
|
<p><a href="{{ user.get_absolute_url }}">{{ user.username }}</a></p>
|
||||||
<form action="{% url 'logout' %}" method="post">
|
<form action="{% url 'logout' %}" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<button type="submit">{% translate "Ausloggen" %}</button>
|
<button type="submit">{% translate "Ausloggen" %}</button>
|
||||||
|
@ -303,9 +303,9 @@ def report_detail_success(request, report_id):
|
|||||||
|
|
||||||
|
|
||||||
def user_detail(request, user_id):
|
def user_detail(request, user_id):
|
||||||
member = Member.objects.get(id=user_id)
|
user = User.objects.get(id=user_id)
|
||||||
context = {"member": member}
|
context = {"user": user, "adoption_notices": AdoptionNotice.objects.filter(created_by=user)}
|
||||||
return render(request, 'fellchensammlung/details/detail-member.html', context=context)
|
return render(request, 'fellchensammlung/details/detail-user.html', context=context)
|
||||||
|
|
||||||
|
|
||||||
def modqueue(request):
|
def modqueue(request):
|
||||||
|
Loading…
Reference in New Issue
Block a user