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
6af16cc8
Commit
6af16cc8
authored
Aug 31, 2016
by
Skia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some basic templating
parent
37d30363
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
9 deletions
+30
-9
club/templates/club/club_detail.jinja
club/templates/club/club_detail.jinja
+14
-4
club/templates/club/club_members.jinja
club/templates/club/club_members.jinja
+14
-4
core/templates/core/user_detail.jinja
core/templates/core/user_detail.jinja
+2
-1
No files found.
club/templates/club/club_detail.jinja
View file @
6af16cc8
{%
extends
"core/base.jinja"
%}
{%
from
'core/macros.jinja'
import
user_profile_link
%}
{%
block
content
%}
<h3>
{%
trans
%}
Club
{%
endtrans
%}
</h3>
...
...
@@ -15,11 +16,20 @@
{%
endif
%}
<h3>
{{
club.name
}}
</h3>
<p>
{{
club.address
}}
</p>
<ul>
{%
for
m
in
club.members.
filter
(
end_date
=
None
)
.
all
()
%}
<li>
{{
m
}}
</li>
<table>
<thead>
<td>
{%
trans
%}
User
{%
endtrans
%}
</td>
<td>
{%
trans
%}
Role
{%
endtrans
%}
</td>
</thead>
<tbody>
{%
for
m
in
club.members.
filter
(
end_date
=
None
)
.
order_by
(
'-role'
)
.
all
()
%}
<tr>
<td>
{{
user_profile_link
(
m.user
)
}}
</td>
<td>
{{
settings.SITH_CLUB_ROLES
[
m.role
]
}}
</td>
</tr>
{%
endfor
%}
</ul>
</tbody>
</table>
{%
endblock
%}
...
...
club/templates/club/club_members.jinja
View file @
6af16cc8
{%
extends
"core/base.jinja"
%}
{%
from
'core/macros.jinja'
import
user_profile_link
%}
{%
block
content
%}
<h2>
{%
trans
%}
Club members
{%
endtrans
%}
</h2>
<ul>
{%
for
m
in
club.members.all
()
%}
<li>
{{
m
}}
</li>
<table>
<thead>
<td>
{%
trans
%}
User
{%
endtrans
%}
</td>
<td>
{%
trans
%}
Role
{%
endtrans
%}
</td>
</thead>
<tbody>
{%
for
m
in
club.members.
filter
(
end_date
=
None
)
.
order_by
(
'-role'
)
.
all
()
%}
<tr>
<td>
{{
user_profile_link
(
m.user
)
}}
</td>
<td>
{{
settings.SITH_CLUB_ROLES
[
m.role
]
}}
</td>
</tr>
{%
endfor
%}
</ul>
</tbody>
</table>
<form
action=
"
{{
url
(
'club:club_members'
,
club_id
=
club.id
)
}}
"
method=
"post"
>
{%
csrf_token
%}
{{
form.as_p
()
}}
...
...
core/templates/core/user_detail.jinja
View file @
6af16cc8
...
...
@@ -45,7 +45,8 @@
{# if the user is member of a club, he can view the subscription state #}
<p>
{%
if
get_subscriber
(
profile
)
.
is_subscribed
()
%}
{%
trans
subscription_end
=
get_subscriber
(
profile
)
.
subscriptions.last
()
.
subscription_end
%}
Subscribed until
{{
subscription_end
}}{%
endtrans
%}
{%
trans
subscription_end
=
get_subscriber
(
profile
)
.
subscriptions.last
()
.
subscription_end
%}
Subscribed until
{{
subscription_end
}}{%
endtrans
%}
<br/>
{%
trans
%}
Account number:
{%
endtrans
%}{{
profile.customer.account_id
}}
{%
else
%}
{%
trans
%}
Not subscribed
{%
endtrans
%}
{%
if
user.is_in_group
(
settings.SITH_MAIN_BOARD_GROUP
)
%}
...
...
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