Commit 168dc3aa authored by Luko van der Maas's avatar Luko van der Maas

Merge branch 'localize-committee-and-board-placeholder-images' into 'master'

Fix localized overview placeholder thumbnail

See merge request !1376

(cherry picked from commit 254ecf14)

4163b021 Fix localized overview placeholder thumbnail
02c5677b Fix code style because some weird pipeline can’t handle lines with more than 79 chars
parent 91f67c38
......@@ -44,7 +44,7 @@
<div class="row mt-4">
{% for board in old_boards %}
<div class="col-4 col-md-3 my-3">
{% membergroup_card board %}
{% membergroup_card board LANGUAGE_CODE %}
</div>
{% endfor %}
</div>
......
......@@ -2,6 +2,7 @@
{% load i18n thumbnail static activemembers_cards alert %}
{% block title %}{% trans 'committees'|capfirst %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans 'committees'|capfirst %} — {{ block.super }}{% endblock %}
{% get_current_language as LANGUAGE_CODE %}
{% block body %}
<section id="activemembers-committees" class="page-section">
......@@ -13,7 +14,7 @@
<div class="row mt-4">
{% for committee in committees %}
<div class="col-4 col-md-3 my-3">
{% membergroup_card committee %}
{% membergroup_card committee LANGUAGE_CODE %}
</div>
{% empty %}
{% trans 'There are no committees!' as no_committees %}
......
......@@ -2,6 +2,7 @@
{% load i18n thumbnail static activemembers_cards alert %}
{% block title %}{% trans 'societies'|capfirst %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans 'societies'|capfirst %} — {{ block.super }}{% endblock %}
{% get_current_language as LANGUAGE_CODE %}
{% block body %}
<section id="activemembers-committees" class="page-section">
......@@ -23,7 +24,7 @@
<div class="row mt-4">
{% for society in societies %}
<div class="col-4 col-md-3 my-3">
{% membergroup_card society %}
{% membergroup_card society LANGUAGE_CODE %}
</div>
{% empty %}
{% trans 'There are no societies!' as no_societies %}
......
......@@ -11,8 +11,9 @@ register = template.Library()
@register.inclusion_tag('includes/grid_item.html')
def membergroup_card(group):
image_url = static('activemembers/images/placeholder_overview.png')
def membergroup_card(group, language):
image_url = static(f'activemembers/images/{language}/'
f'placeholder_overview.png')
if group.photo:
image_url = get_thumbnail_url(group.photo,
settings.THUMBNAIL_SIZES['medium'])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment