Modify property names

This commit is contained in:
Antoine Bartuccio 2016-09-22 13:07:22 +02:00
parent e250acf82d
commit 380f41445a
2 changed files with 5 additions and 3 deletions

View File

@ -232,12 +232,12 @@ class User(AbstractBaseUser):
return self.is_superuser or self.groups.filter(name=settings.SITH_GROUPS['root']['name']).exists()
@property
def is_office(self):
def is_board_member(self):
from club.models import Club
return Club.objects.filter(unix_name=settings.SITH_MAIN_CLUB['unix_name']).first().get_membership_for(self)
@property
def is_launderette(self):
def is_launderette_manager(self):
from club.models import Club
return Club.objects.filter(unix_name=settings.SITH_LAUNDERETTE_MANAGER['unix_name']).first().get_membership_for(self)

View File

@ -56,9 +56,11 @@
{# if the user is member of a club, he can view the subscription state #}
<p>
{% 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 %}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 #}
{{ show_tokens(profile) }}
{# Shows slots took by the user #}