user_godfathers.jinja 1.46 KB
Newer Older
Skia's avatar
Skia committed
1
{% extends "core/base.jinja" %}
Sli's avatar
Sli committed
2
{% from "core/macros.jinja" import user_link_with_pict, delete_godfather %}
Skia's avatar
Skia committed
3
4
5
6
7
8

{% block title %}
{% trans user_name=profile.get_display_name() %}{{ user_name }}'s godfathers{% endtrans %}
{% endblock %}

{% block content %}
Sli's avatar
Sli committed
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
    {% if profile.godfathers.exists() %}
        <h4>{% trans %}Godfathers{% endtrans %}</h4>
        <ul>
            {% for u in profile.godfathers.all() %}
                <li> <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>
    {% else %}
        <p>{% trans %}No godfathers{% endtrans %}
    {% endif %}
    {% if profile.godchildren.exists() %}
        <h4>{% trans %}Godchildren{% endtrans %}</h4>
        <ul>
            {% for u in profile.godchildren.all() %}
                <li> <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>
    {% else %}
        <p>{% trans %}No godchildren{% endtrans %}
    {% endif %}
    {% if profile == user  or user.is_root %}
Skia's avatar
Skia committed
32
33
34
35
36
37
38
39
    <form action="" method="post">
        {% csrf_token %}
        {{ form.as_p() }}
        <p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
    </form>
    {% endif %}
{% endblock %}