From ffd4dac2e27f9a86519dc9dd29f49b0880b6f253 Mon Sep 17 00:00:00 2001 From: Skia Date: Thu, 22 Sep 2016 12:52:15 +0200 Subject: [PATCH] Allow club staff to delete their sellings --- club/templates/club/club_sellings.jinja | 3 +++ core/templates/core/user_account_detail.jinja | 2 +- core/views/user.py | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/club/templates/club/club_sellings.jinja b/club/templates/club/club_sellings.jinja index 9f098015..7be82f37 100644 --- a/club/templates/club/club_sellings.jinja +++ b/club/templates/club/club_sellings.jinja @@ -36,6 +36,9 @@ {{ s.quantity }} {{ s.quantity * s.unit_price }} € {{ s.get_payment_method_display() }} + {% if s.is_owned_by(user) %} + {% trans %}Delete{% endtrans %} + {% endif %} {% endfor %} diff --git a/core/templates/core/user_account_detail.jinja b/core/templates/core/user_account_detail.jinja index 4f239c49..5c74579d 100644 --- a/core/templates/core/user_account_detail.jinja +++ b/core/templates/core/user_account_detail.jinja @@ -64,7 +64,7 @@ {{ i.quantity * i.unit_price }} € {{ i.get_payment_method_display() }} {% if i.is_owned_by(user) %} - Delete + {% trans %}Delete{% endtrans %} {% endif %} {% endfor %} diff --git a/core/views/user.py b/core/views/user.py index 9bdfc006..7748c86f 100644 --- a/core/views/user.py +++ b/core/views/user.py @@ -439,3 +439,4 @@ class UserAccountDetailView(UserAccountBase, YearMixin, MonthMixin): pass kwargs['tab'] = "account" return kwargs +