diff --git a/core/templates/core/macros.jinja b/core/templates/core/macros.jinja index cba03994..21ef4151 100644 --- a/core/templates/core/macros.jinja +++ b/core/templates/core/macros.jinja @@ -55,3 +55,9 @@ {% endif %} {% endmacro %} + +{% macro delete_godfather(user, profile, godfather, is_father) %} + {% if user == profile or user.is_root or user.is_board_member %} + {% trans %}Delete{% endtrans %} + {% endif %} +{% endmacro %} \ No newline at end of file diff --git a/core/templates/core/user_godfathers.jinja b/core/templates/core/user_godfathers.jinja index a82e622d..80331c5e 100644 --- a/core/templates/core/user_godfathers.jinja +++ b/core/templates/core/user_godfathers.jinja @@ -1,26 +1,34 @@ {% extends "core/base.jinja" %} -{% from "core/macros.jinja" import user_link_with_pict %} +{% from "core/macros.jinja" import user_link_with_pict, delete_godfather %} {% block title %} {% trans user_name=profile.get_display_name() %}{{ user_name }}'s godfathers{% endtrans %} {% endblock %} {% block content %} -
{% trans %}No godfathers{% endtrans %} + {% endif %} + {% if profile.godchildren.exists() %} +
{% trans %}No godchildren{% endtrans %} + {% endif %} + {% if profile == user or user.is_root %}