Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
AE UTBM
Sith
Commits
760b3372
Commit
760b3372
authored
Oct 05, 2016
by
guillaume-renaud
Browse files
Addition of the user's club tab as table
parent
1b63d585
Pipeline
#282
failed with stage
in 3 minutes and 14 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
core/templates/core/user_clubs.jinja
View file @
760b3372
...
...
@@ -6,19 +6,57 @@
{%
block
content
%}
<h3>
{%
trans
%}
Club(s)
{%
endtrans
%}
</h3>
<br>
<h4>
{%
trans
%}
Current club(s)
{%
endtrans
%}
</h4>
<ul>
{%
for
m
in
profile.memberships.
filter
(
end_date
=
None
)
.
all
()
%}
<li><a
href=
"
{{
url
(
'club:club_members'
,
club_id
=
m.club.id
)
}}
"
>
{{
m.club
}}
</a></li>
{%
endfor
%}
</ul>
<br>
<table>
<thead>
<tr>
<td>
{%
trans
%}
User
{%
endtrans
%}
</td>
<td>
{%
trans
%}
Role
{%
endtrans
%}
</td>
<td>
{%
trans
%}
Description
{%
endtrans
%}
</td>
<td>
{%
trans
%}
Since
{%
endtrans
%}
</td>
</tr>
</thead>
<tbody>
{%
for
m
in
profile.memberships.
filter
(
end_date
=
None
)
.
all
()
%}
<tr>
<td><a
href=
"
{{
url
(
'club:club_members'
,
club_id
=
m.club.id
)
}}
"
>
{{
m.club
}}
</a></td>
<td>
{{
settings.SITH_CLUB_ROLES
[
m.role
]
}}
</td>
<td>
{{
m.description
}}
</td>
<td>
{{
m.start_date
}}
</td>
{%
if
m.can_be_edited_by
(
user
)
%}
<td><a
href=
"
{{
url
(
'club:membership_set_old'
,
membership_id
=
m.id
)
}}
"
>
{%
trans
%}
Mark as old
{%
endtrans
%}
</a></td>
{%
endif
%}
</tr>
{%
endfor
%}
</tbody>
</table>
<h4>
{%
trans
%}
Old club(s)
{%
endtrans
%}
</h4>
<ul>
{%
for
m
in
profile.memberships.exclude
(
end_date
=
None
)
.
all
()
%}
<li><a
href=
"
{{
url
(
'club:club_members'
,
club_id
=
m.club.id
)
}}
"
>
{{
m.club
}}
</a></li>
{%
endfor
%}
</ul>
<br>
<table>
<thead>
<tr>
<td>
{%
trans
%}
User
{%
endtrans
%}
</td>
<td>
{%
trans
%}
Role
{%
endtrans
%}
</td>
<td>
{%
trans
%}
Description
{%
endtrans
%}
</td>
<td>
{%
trans
%}
From
{%
endtrans
%}
</td>
<td>
{%
trans
%}
To
{%
endtrans
%}
</td>
</tr>
</thead>
<tbody>
{%
for
m
in
profile.memberships.exclude
(
end_date
=
None
)
.
all
()
%}
<tr>
<td><a
href=
"
{{
url
(
'club:club_members'
,
club_id
=
m.club.id
)
}}
"
>
{{
m.club
}}
</a></td>
<td>
{{
settings.SITH_CLUB_ROLES
[
m.role
]
}}
</td>
<td>
{{
m.description
}}
</td>
<td>
{{
m.start_date
}}
</td>
<td>
{{
m.end_date
}}
</td>
</tr>
{%
endfor
%}
</tbody>
</table>
{%
endblock
%}
Write
Preview
Supports
Markdown
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