Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
AE
Sith
Commits
380f4144
Commit
380f4144
authored
Sep 22, 2016
by
Sli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify property names
parent
e250acf8
Pipeline
#242
failed with stage
in 12 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
core/models.py
core/models.py
+2
-2
core/templates/core/user_detail.jinja
core/templates/core/user_detail.jinja
+3
-1
No files found.
core/models.py
View file @
380f4144
...
...
@@ -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
)
...
...
core/templates/core/user_detail.jinja
View file @
380f4144
...
...
@@ -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 #}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment