2016-09-19 18:29:43 +00:00
|
|
|
{% extends "core/base.jinja" %}
|
2016-09-29 13:04:43 +00:00
|
|
|
{% from "core/macros.jinja" import user_link_with_pict, delete_godfather %}
|
2016-09-19 18:29:43 +00:00
|
|
|
|
2023-03-30 12:38:40 +00:00
|
|
|
{%- block additional_css -%}
|
2024-09-17 21:42:05 +00:00
|
|
|
<link rel="stylesheet" href="{{ static('user/user_godfathers.scss') }}">
|
2023-03-30 12:38:40 +00:00
|
|
|
{%- endblock -%}
|
|
|
|
|
2016-09-19 18:29:43 +00:00
|
|
|
{% block title %}
|
2024-07-23 22:16:31 +00:00
|
|
|
{% trans user_name=profile.get_display_name() %}{{ user_name }}'s family{% endtrans %}
|
2016-09-19 18:29:43 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2024-07-23 22:16:31 +00:00
|
|
|
<div class="container">
|
2024-09-17 10:10:06 +00:00
|
|
|
{% if godchildren or godfathers %}
|
|
|
|
<a
|
|
|
|
href="{{ url('core:user_godfathers_tree', user_id=profile.id) }}"
|
|
|
|
class="btn btn-blue"
|
|
|
|
id="family-tree-link"
|
|
|
|
>
|
|
|
|
{% trans %}Show family tree{% endtrans %}
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
2023-03-30 12:38:40 +00:00
|
|
|
|
|
|
|
<h4>{% trans %}Godfathers / Godmothers{% endtrans %}</h4>
|
2024-09-17 10:10:06 +00:00
|
|
|
{% if godfathers %}
|
2024-07-23 22:16:31 +00:00
|
|
|
<ul class="users">
|
2024-09-17 10:10:06 +00:00
|
|
|
{% for u in godfathers %}
|
2024-07-23 22:16:31 +00:00
|
|
|
<li class="users-card">
|
|
|
|
<a href="{{ url('core:user_godfathers', user_id=u.id) }}" class="mini_profile_link">
|
|
|
|
{{ u.get_mini_item() | safe }}
|
|
|
|
</a>
|
|
|
|
{{ delete_godfather(user, profile, u, True) }}
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
2023-03-30 12:38:40 +00:00
|
|
|
|
2016-09-29 13:04:43 +00:00
|
|
|
{% else %}
|
2024-07-23 22:16:31 +00:00
|
|
|
<p>{% trans %}No godfathers / godmothers{% endtrans %}
|
2016-09-29 13:04:43 +00:00
|
|
|
{% endif %}
|
2023-03-30 12:38:40 +00:00
|
|
|
|
|
|
|
<h4>{% trans %}Godchildren{% endtrans %}</h4>
|
2024-09-17 10:10:06 +00:00
|
|
|
{% if godchildren %}
|
2024-07-23 22:16:31 +00:00
|
|
|
<ul class="users">
|
2024-09-17 10:10:06 +00:00
|
|
|
{% for u in godchildren %}
|
2024-07-23 22:16:31 +00:00
|
|
|
<li class="users-card">
|
|
|
|
<a href="{{ url('core:user_godfathers', user_id=u.id) }}" class="mini_profile_link">
|
|
|
|
{{ u.get_mini_item()|safe }}
|
|
|
|
</a>
|
|
|
|
{{ delete_godfather(user, profile, u, False) }}
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
2016-09-29 13:04:43 +00:00
|
|
|
{% else %}
|
2024-07-23 22:16:31 +00:00
|
|
|
<p>{% trans %}No godchildren{% endtrans %}
|
2016-09-29 13:04:43 +00:00
|
|
|
{% endif %}
|
2023-03-30 12:38:40 +00:00
|
|
|
|
|
|
|
{% if profile == user or user.is_root %}
|
2024-07-23 22:16:31 +00:00
|
|
|
<form action="" method="post">
|
2016-09-19 18:29:43 +00:00
|
|
|
{% csrf_token %}
|
|
|
|
{{ form.as_p() }}
|
|
|
|
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
|
2024-07-23 22:16:31 +00:00
|
|
|
</form>
|
2016-09-19 18:29:43 +00:00
|
|
|
{% endif %}
|
2024-07-23 22:16:31 +00:00
|
|
|
</div>
|
2016-09-19 18:29:43 +00:00
|
|
|
{% endblock %}
|
|
|
|
|