mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 14:13:21 +00:00
Modify property names
This commit is contained in:
parent
e250acf82d
commit
380f41445a
@ -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 @@
|
|||||||
{# 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 #}
|
||||||
|
Loading…
Reference in New Issue
Block a user