{% load staticfiles %}
{% load thumbnail %}

{% if position_in_list %}
  <span class="person-position">{{ position_in_list }}</span>
{% endif %}
{% if c.extra.primary_image %}
  <a href="{% url 'person-view' c.id c.name|slugify %}">
    {% thumbnail c.extra.primary_image "x64" as im %}
      <img class="person-avatar" src="{{ im.url }}"/>
    {% endthumbnail %}
  </a>
{% elif c.popit_data.gender|lower == 'female' %}
  <img class="person-avatar" src="{% static 'candidates/img/blank-woman.png' %}"/>
{% else %}
  <img class="person-avatar" src="{% static 'candidates/img/blank-man.png' %}"/>
{% endif %}
<div class="person-name-and-party">
  <a href="{% url 'person-view' c.id c.name|slugify %}" class="candidate-name">{{ c.name }}</a>
  <span class="party">{{ party.name }}</span>
</div>

{% load staticfiles %}
{% load thumbnail %}

{% if position_in_list %}
  <span class="person-position">{{ position_in_list }}</span>
{% endif %}
{% if c.extra.primary_image %}
  <a href="{% url 'person-view' c.id c.name|slugify %}">
    {% thumbnail c.extra.primary_image "x64" as im %}
      <img class="person-avatar" src="{{ im.url }}"/>
    {% endthumbnail %}
  </a>
{% elif c.gender|lower == 'female' %}
  <img class="person-avatar" src="{% static 'candidates/img/blank-woman.png' %}"/>
{% else %}
  <img class="person-avatar" src="{% static 'candidates/img/blank-man.png' %}"/>
{% endif %}
<div class="person-name-and-party">
  <a href="{% url 'person-view' c.id c.name|slugify %}" class="candidate-name">{{ c.name }}</a>
  <span class="party">{{ party.name }}</span>
</div>

Replace old PopIt gender in avatar selection with Popolo's
Replace old PopIt gender in avatar selection with Popolo's

This fixes showing a silhouette of a woman in the absence of an
uploaded photo in candidate lists.
