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
8771cc9b
Commit
8771cc9b
authored
Nov 30, 2016
by
Skia
🤘
Browse files
Enhance user picture view
parent
7453b857
Pipeline
#457
passed with stage
in 2 minutes and 48 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
core/templates/core/base.jinja
View file @
8771cc9b
...
...
@@ -85,7 +85,7 @@
<div
class=
"tools"
>
{%
for
t
in
list_of_tabs
%}
<a
href=
"
{{
t.url
}}
"
{%
-
if
current_tab
==
t.slug
-
%}
{%
-
if
current_tab
==
t.slug
%}
class=
"selected_tab"
{%
-
endif
-
%}
>
{{
t.name
}}
</a>
...
...
core/templates/core/user_pictures.jinja
View file @
8771cc9b
...
...
@@ -6,19 +6,27 @@
{%
endblock
%}
{%
block
content
%}
{%
for
r
in
profile.pictures.exclude
(
picture
=
None
)
.
values
(
'user__pictures__picture__parent'
)
.
distinct
()
%}
<div
style=
"padding: 10px"
>
{%
set
album
=
profile.pictures.
filter
(
picture__parent
=
r
[
'user__pictures__picture__parent'
])
.
first
()
.
picture.parent
%}
<h4>
{{
album.name
}}
</h4>
<hr>
{%
for
r
in
profile.pictures.exclude
(
picture
=
None
)
.
filter
(
picture__parent
=
album
)
.
order_by
(
'id'
)
%}
<div
class=
"picture"
>
<a
href=
"
{{
url
(
"sas:picture"
,
picture_id
=
r.picture.id
)
}}
#pict"
>
<img
src=
"
{{
r.picture.as_picture.get_download_thumb_url
()
}}
"
alt=
"
{{
r.picture.get_display_name
()
}}
"
style=
"max-width: 100%"
/>
</a>
{%
set
album
=
None
%}
{%
set
new_album
=
True
%}
{%
for
r
in
profile.pictures.exclude
(
picture
=
None
)
.
order_by
(
'-picture__parent__id'
,
'id'
)
-
%}
{%
-
if
album
!=
r.picture.parent
%}
{%
-
if
album
%}
</div>
{%
endif
-
%}
{%
set
new_album
=
True
%}
{%
set
album
=
r.picture.parent
%}
<div
style=
"padding: 10px"
>
<h4>
{{
album.name
}}
</h4>
<hr>
{%
else
%}
{%
set
new_album
=
False
%}
{%
-
endif
%}
<div
class=
"picture"
>
<a
href=
"
{{
url
(
"sas:picture"
,
picture_id
=
r.picture.id
)
}}
#pict"
>
<img
src=
"
{{
r.picture.as_picture.get_download_thumb_url
()
}}
"
alt=
"
{{
r.picture.get_display_name
()
}}
"
style=
"max-width: 100%"
/>
</a>
</div>
{%
-
endfor
%}
</div>
{%
endfor
%}
</div>
{%
endfor
%}
{%
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