<commit_before>{% extends 'base.html' %}
{% load pagination_tags %}

{% block title %}{{ object.name }} People{% endblock %}

{% block content %}

  <h2>Members of {{ object.name }}</h2>
  <div class="layout layout-major-minor">

    <div class="column minor-column">
      <div class="filters sidebar">
        <h3>Show</h3>
        <p><a href="?historic=" class="{% if not request.GET.historic and not request.GET.all %}active{% endif %}">Current members ({{ all_positions.currently_active.count }})</a></p>
        <p><a href="?historic=1" class="{% if request.GET.historic %}active{% endif %}">Past members ({{ all_positions.currently_inactive.count }})</a></p>
        <p><a href="?all=1" class="{% if request.GET.all %}active{% endif %}">All members ({{ all_positions.count }})</a></p>

        <h3>Sort by</h3>
        <p><a href="?order=name" class="{% if request.GET.order == "name" %}active{% endif %}">Alphabetical</a></p>
        <p><a href="?order=party" class="{% if request.GET.order == "party" %}active{% endif %}">Party</a></p>
        <p><a href="?order=place" class="{% if request.GET.order == "place" %}active{% endif %}">Location</a></p>
      </div>
    </div>

    <div class="column major-column">
      <div class="list-of-things list-of-people">
          {% autopaginate sorted_positions %}

          {# pombola/south_africa/templates/core/_position_listing.html #}
          {% include "core/_position_listing.html" with positions=sorted_positions %}

          {# pombola/south_africa/templates/core/_search_pagination_text.html #}
          {% include "core/_search_pagination_text.html" %}

          {% paginate %}
      </div>
    </div>
  </div>

{% endblock content %}<commit_msg>Bring all the position related html into one place for easier large changes<commit_after>{% extends 'base.html' %}
{% load pagination_tags %}
{% load thumbnail %}


{% block title %}{{ object.name }} People{% endblock %}

{% block content %}

  <h2>Members of {{ object.name }}</h2>
  <div class="layout layout-major-minor">

    <div class="column minor-column">
      <div class="filters sidebar">
        <h3>Show</h3>
        <p><a href="?historic=" class="{% if not request.GET.historic and not request.GET.all %}active{% endif %}">Current members ({{ all_positions.currently_active.count }})</a></p>
        <p><a href="?historic=1" class="{% if request.GET.historic %}active{% endif %}">Past members ({{ all_positions.currently_inactive.count }})</a></p>
        <p><a href="?all=1" class="{% if request.GET.all %}active{% endif %}">All members ({{ all_positions.count }})</a></p>

        <h3>Sort by</h3>
        <p><a href="?order=name" class="{% if request.GET.order == "name" %}active{% endif %}">Alphabetical</a></p>
        <p><a href="?order=party" class="{% if request.GET.order == "party" %}active{% endif %}">Party</a></p>
        <p><a href="?order=place" class="{% if request.GET.order == "place" %}active{% endif %}">Location</a></p>
      </div>
    </div>

    <div class="column major-column">
      <div class="list-of-things list-of-people">
          {% autopaginate sorted_positions %}

          <ul class="unstyled-list">
          {% for position in positions %}
              {% with object=position.person %}

                <li class="list-of-things-item {{ object.css_class }}-list-item{% if not object.show_active %} inactive{% endif %}">

                  <a href="{{ object.get_absolute_url }}">
                      {% thumbnail object.primary_image "58x78" crop="center" as im %}
                      <img src="{{ im.url }}" alt="{{ object.name }}" width="{{ im.width }}" height="{{ im.height }}" />
                      {% empty %}
                      <img src="{{STATIC_URL}}images/person-90x90.jpg" height="58" width="58"/>
                      {% endthumbnail %}

                      <span class="name">{{ object.name }}</span>
                  </a>

                  {% for position in object.position_set.all.currently_active %}
                  {% if position.place %}
                  <div class="position-place">
                      <a href="{{ position.place.get_absolute_url }}">{{ position.place.name }}</a>

                      {% if position.place.parent_place %}
                      <a href="{{ position.place.parent_place.get_absolute_url }}">{{ position.place.parent_place.name }}</a>
                      {{ position.place.parent_place.kind.name }}
                      {% endif %}
                  </div>
                  {% endif %}
                  {% endfor %}

                  {% if object.parties %}
                  <div class="position-parties">
                      {% for party in object.parties %}
                      <a class="position-party" href="{{ party.get_absolute_url }}">{{ party.name }}</a>
                      {% endfor %}
                  </div>
                  {% endif %}

                </li>

              {% endwith %}
          {% empty %}
              <li>No records found.</li>
          {% endfor %}
          </ul>

          {# pombola/south_africa/templates/core/_search_pagination_text.html #}
          {% include "core/_search_pagination_text.html" %}

          {% paginate %}
      </div>
    </div>
  </div>

{% endblock content %}
{'fraction_non_alphanumeric': 0.1869441816461684, 'fraction_numerical': 0.005298013245033113, 'mean_word_length': 2.2609500308451573, 'pattern_counts': {'":': 0, '<': 105, '<?xml version=': 0, '>': 105, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3520628', 'n_tokens_mistral': 1769, 'n_tokens_neox': 1530, 'n_words': 337}