Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

display user avatars at various places #2157

Merged
merged 6 commits into from May 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -3,6 +3,7 @@
## Current (in progress)

- Remove `<br>` in badge display [#2156](https://github.com/opendatateam/udata/pull/2156)
- Display user avatar and fix its sizing [#2157](https://github.com/opendatateam/udata/pull/2157)

## 1.6.9 (2019-05-20)

Expand Down
2 changes: 1 addition & 1 deletion less/site.less
Expand Up @@ -221,7 +221,7 @@ hr {
}

img.scalable {
max-width: 100%;
width: 100%;
taniki marked this conversation as resolved.
Show resolved Hide resolved
}

.clickable {
Expand Down
6 changes: 6 additions & 0 deletions udata/templates/dataset/card.html
Expand Up @@ -8,6 +8,12 @@
width="70" height="70">
</div>
{{ badge_if_certified(dataset.organization) }}
{% elif dataset.owner %}
<div class="card-logo">
<img alt="{{ dataset.owner.fullname }}"
src="{{ dataset.owner.avatar(70)|placeholder('user') }}"
width="70" height="70">
</div>
{% else %}
<div class="card-logo">
<img src="{{ ''|placeholder('organization', external=True) }}" alt="">
Expand Down
6 changes: 6 additions & 0 deletions udata/templates/dataset/search-result.html
Expand Up @@ -9,6 +9,12 @@
width="70" height="70">
</div>
{{ badge_if_certified(dataset.organization) }}
{% elif dataset.owner %}
<div class="result-logo pull-left">
<img alt="{{ dataset.owner.fullname }}"
src="{{ dataset.owner.avatar(70)|placeholder('user') }}"
width="70" height="70">
</div>
{% else %}
<div class="result-logo pull-left">
<img src="{{ ''|placeholder('organization') }}" alt="">
Expand Down
3 changes: 1 addition & 2 deletions udata/templates/reuse/display.html
Expand Up @@ -147,8 +147,7 @@ <h3 class="text-left">{{ _('Author') }}</h3>
<a href="{{ url_for('users.show', user=reuse.owner) }}"
title="{{ reuse.owner.fullname }}">
<img src="{{ reuse.owner|avatar_url(200) }}"
alt="{{ reuse.owner.fullname }}" class="scalable"
width="200" height="200"/>
alt="{{ reuse.owner.fullname }}" class="scalable" />
</a>
<h4 class="text-center">{{ reuse.owner.fullname }}</h4>
<div class="caption text-left">
Expand Down