_representative_card.html 1.84 KB
Newer Older
Nicolas Joyard's avatar
Nicolas Joyard committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
{% load memopol_tags %}

<div class="col-xs-12 col-md-{{ cols|default:4 }} representative-card">
  <div class="thumbnail">
    <a href="{% url 'representative-detail' slug=representative.slug %}" class="custom-thumbnail custom-invisible">
      <div class="row">
        <div class="col-xs-5">
          <img src="data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" class="img-responsive" style="background-image: url({{ representative.photo }});">
          <div class="custom-thumbnail-details">
            {% if representative.country %}
            <div class="icon-badge-detail">{{ representative.country|country_flag }} {{ representative.country.name }}</div>
            {% endif %}
            {% if representative.chamber %}
            <div class="icon-badge-detail">{{ representative.chamber|chamber_icon }} {{ representative.chamber.name }}</div>
            {% endif %}
            {% if representative.main_mandate.group %}
            <div class="icon-badge-detail">{{ representative.main_mandate.group|group_icon }} {{ representative.main_mandate.group.abbreviation }}</div>
            {% endif %}
          </div>
        </div>

        <div class="col-xs-7">
          <h4 class="text-center">{{ representative.full_name }}</h4>
          <p class="text-center">
            <br>
            {% if representative.country %}
            {{ representative.country|country_flag }}
            {% endif %}
            {% if representative.chamber %}
            {{ representative.chamber|chamber_icon }}
            {% endif %}
            {% if representative.main_mandate.group %}
            {{ representative.main_mandate.group|group_icon }}
            {% endif %}
          </p>
          <p class="text-right">{{ representative.representative_score.score|score_badge }}</p>
        </div>

      </div>
    </a>
  </div>
</div>