Commit 380f4144 authored by Sli's avatar Sli

Modify property names

parent e250acf8
Pipeline #242 failed with stage
in 12 seconds
...@@ -232,12 +232,12 @@ class User(AbstractBaseUser): ...@@ -232,12 +232,12 @@ class User(AbstractBaseUser):
return self.is_superuser or self.groups.filter(name=settings.SITH_GROUPS['root']['name']).exists() return self.is_superuser or self.groups.filter(name=settings.SITH_GROUPS['root']['name']).exists()
@property @property
def is_office(self): def is_board_member(self):
from club.models import Club from club.models import Club
return Club.objects.filter(unix_name=settings.SITH_MAIN_CLUB['unix_name']).first().get_membership_for(self) return Club.objects.filter(unix_name=settings.SITH_MAIN_CLUB['unix_name']).first().get_membership_for(self)
@property @property
def is_launderette(self): def is_launderette_manager(self):
from club.models import Club from club.models import Club
return Club.objects.filter(unix_name=settings.SITH_LAUNDERETTE_MANAGER['unix_name']).first().get_membership_for(self) return Club.objects.filter(unix_name=settings.SITH_LAUNDERETTE_MANAGER['unix_name']).first().get_membership_for(self)
......
...@@ -56,9 +56,11 @@ ...@@ -56,9 +56,11 @@
{# if the user is member of a club, he can view the subscription state #} {# if the user is member of a club, he can view the subscription state #}
<p> <p>
{% if get_subscriber(profile).is_subscribed() %} {% if get_subscriber(profile).is_subscribed() %}
{% if user == profile or user.is_root or user.is_office %} {% if user == profile or user.is_root or user.is_board_member %}
{% trans subscription_end=get_subscriber(profile).subscriptions.last().subscription_end %}Subscribed until {{ subscription_end }}{% endtrans %}<br/> {% trans subscription_end=get_subscriber(profile).subscriptions.last().subscription_end %}Subscribed until {{ subscription_end }}{% endtrans %}<br/>
{% trans %}Account number: {% endtrans %}{{ profile.customer.account_id }}<br/> {% trans %}Account number: {% endtrans %}{{ profile.customer.account_id }}<br/>
{% endif %}
{% if user == profile or user.is_root or user.is_board_member or user.is_launderette_manager %}
{# Shows tokens bought by the user #} {# Shows tokens bought by the user #}
{{ show_tokens(profile) }} {{ show_tokens(profile) }}
{# Shows slots took by the user #} {# Shows slots took by the user #}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment