<commit_before>{% extends '::ojsbase.html.twig' %}

{% set hideleft = 1 %}
{% block title %}{{ "title.people_directory"|trans }} {{ parent() }}{% endblock %}
{% block breadcrumb %}
    {% set list = [
        {'link': path('ojs_public_index'), 'title': 'title.home'|trans},
        {'title': 'title.people_directory'|trans}
    ] %}
    {{ breadcrumb(list) }}
{% endblock %}

{% block body %}
<div class="text-center">
    <ul class="pagination">
        {{ pagerfanta(pagerfanta,'twitter_bootstrap3') }}
    </ul>
</div>
<div class="container">
    <div class="col-sm-3">
        <div class="panel-group">
            <div class="panel panel-primary">
                <div class="panel-heading"><h4>{{ 'subjects'|trans }}</h4></div>
                <ul class="list-group">
                    {% for subject in subjects %}
                        <li class="list-group-item">
                            {% if subject_filters is empty %}
                                {% set parameter = subject.key %}
                                <a href="{{ path('people_index', {
                                    subject_filters: subject.key,
                                    role_filters: app.request.get('role_filters'),
                                    journal_filters: app.request.get('journal_filters')}) }}">{{ subject.key }}</a>
                            {% else %}
                                {% if subject.key in subject_filters %}
                                    {% set parameter = subject_filters|pop(subject.key) %}
                                    {{ subject.key }}
                                    <a href="{{ path('people_index', {
                                        subject_filters: parameter|join(','),
                                        role_filters: app.request.get('role_filters'),
                                        journal_filters: app.request.get('journal_filters')}) }}">
                                        <span class="label label-danger">
                                            <i class="glyphicon glyphicon-remove"></i>
                                        </span>
                                    </a>
                                {% else %}
                                    {% set parameter = subject_filters|merge([subject.key]) %}
                                    <a href="{{ path('people_index', {
                                        subject_filters: parameter|join(','),
                                        role_filters: app.request.get('role_filters'),
                                        journal_filters: app.request.get('journal_filters')}) }}">{{ subject.key }}</a>
                                {% endif %}
                            {% endif %}
                            <span class="badge">{{ subject.doc_count }}</span>
                        </li>
                    {% endfor %}
                </ul>
            </div>

            <div class="panel panel-primary">
                <div class="panel-heading"><h4>{{ 'journals'|trans }}</h4></div>
                <ul class="list-group">
                    {% for journal in journals %}
                        <li class="list-group-item">
                            {% if journal_filters is empty %}
                                {% set parameter = journal.key %}
                                <a href="{{ path('people_index', {
                                    journal_filters: journal.key,
                                    role_filters: app.request.get('role_filters'),
                                    subject_filters: app.request.get('subject_filters')}) }}">{{ journal.key }}</a>
                            {% else %}
                                {% if journal.key in journal_filters %}
                                    {% set parameter = journal_filters|pop(journal.key) %}
                                    {{ journal.key }}
                                    <a href="{{ path('people_index', {
                                        journal_filters: parameter|join(','),
                                        role_filters: app.request.get('role_filters'),
                                        subject_filters: app.request.get('subject_filters')}) }}">
                                        <span class="label label-danger">
                                            <i class="glyphicon glyphicon-remove"></i>
                                        </span>
                                    </a>
                                {% else %}
                                    {% set parameter = journal_filters|merge([journal.key]) %}
                                    <a href="{{ path('people_index', {
                                        journal_filters: parameter|join(','),
                                        role_filters: app.request.get('role_filters'),
                                        subject_filters: app.request.get('subject_filters')}) }}">{{ journal.key }}</a>
                                {% endif %}
                            {% endif %}
                            <span class="badge">{{ journal.doc_count }}</span>
                        </li>
                    {% endfor %}
                </ul>
            </div>

            <div class="panel panel-primary">
                <div class="panel-heading"><h4>{{ 'roles'|trans }}</h4></div>
                <ul class="list-group">
                    {% for role in roles %}
                        <li class="list-group-item">
                            {% if role_filters is empty %}
                                {% set parameter = role.key %}
                                <a href="{{ path('people_index', {
                                    role_filters: role.key,
                                    subject_filters: app.request.get('subject_filters'),
                                    journal_filters: app.request.get('journal_filters') }) }}">{{ role.key|trans }}</a>
                            {% else %}
                                {% if role.key in role_filters %}
                                    {% set parameter = role_filters|pop(role.key) %}
                                    {{ role.key|trans }}
                                    <a href="{{ path('people_index', {
                                        role_filters: parameter|join(','),
                                        subject_filters: app.request.get('subject_filters'),
                                        journal_filters: app.request.get('journal_filters')}) }}">
                                        <span class="label label-danger">
                                            <i class="glyphicon glyphicon-remove"></i>
                                        </span>
                                    </a>
                                {% else %}
                                    {% set parameter = role_filters|merge([role.key]) %}
                                    <a href="{{ path('people_index', {
                                        role_filters: parameter|join(','),
                                        subject_filters: app.request.get('subject_filters'),
                                        journal_filters: app.request.get('journal_filters')}) }}">{{ role.key|trans }}</a>
                                {% endif %}
                            {% endif %}
                            <span class="badge">{{ role.doc_count }}</span>
                        </li>
                    {% endfor %}
                </ul>
            </div>
        </div>
    </div>

    <div class="col-sm-9">
    {% for person in people %}
        <div class="well col-sm-3">
            <div class="text-center">
                <a href="/@{{ person.username }}" class="thumbnail">
                    <img class="img-circle"
                         src="{{ person.avatar is defined ? '/uploads/avatarfiles/' ~ imagePath(person.avatar) : '#' }}"
                         alt="{{ person.username|default('image'|trans) }}"
                         data-src="holder.js/100x100/random"
                         style="width: 100px; height: 100px;">
                </a>

                <h3>
                    <a href="/@{{ person.username|default('') }}">
                    {% if person.firstName is defined and person.lastName is defined  %}
                        {{ person.firstName|default('') }} {{ person.lastName|default('') }}
                    {% else %}
                        {{ person.username }}
                    {% endif %}
                    </a>
                </h3>
            </div>

            <div>
                <h4>
                    {% for subject in person.subjects %}
                        <span class="label label-primary">{{ subject|trans }}</span>
                    {% endfor %}
                </h4>
            </div>
        </div>
    {% endfor %}
    </div>
</div>
<div class="text-center">
    <ul class="pagination">
        {{ pagerfanta(pagerfanta,'twitter_bootstrap3') }}
    </ul>
</div>
{% endblock %}<commit_msg>Set person card height to a fixed value, add margins to person cards<commit_after>{% extends '::ojsbase.html.twig' %}

{% set hideleft = 1 %}
{% block title %}{{ "title.people_directory"|trans }} {{ parent() }}{% endblock %}
{% block breadcrumb %}
    {% set list = [
        {'link': path('ojs_public_index'), 'title': 'title.home'|trans},
        {'title': 'title.people_directory'|trans}
    ] %}
    {{ breadcrumb(list) }}
{% endblock %}

{% block body %}
<div class="text-center">
    <ul class="pagination">
        {{ pagerfanta(pagerfanta,'twitter_bootstrap3') }}
    </ul>
</div>
<div class="container">
    <div class="col-sm-3">
        <div class="panel-group">
            <div class="panel panel-primary">
                <div class="panel-heading"><h4>{{ 'subjects'|trans }}</h4></div>
                <ul class="list-group">
                    {% for subject in subjects %}
                        <li class="list-group-item">
                            {% if subject_filters is empty %}
                                {% set parameter = subject.key %}
                                <a href="{{ path('people_index', {
                                    subject_filters: subject.key,
                                    role_filters: app.request.get('role_filters'),
                                    journal_filters: app.request.get('journal_filters')}) }}">{{ subject.key }}</a>
                            {% else %}
                                {% if subject.key in subject_filters %}
                                    {% set parameter = subject_filters|pop(subject.key) %}
                                    {{ subject.key }}
                                    <a href="{{ path('people_index', {
                                        subject_filters: parameter|join(','),
                                        role_filters: app.request.get('role_filters'),
                                        journal_filters: app.request.get('journal_filters')}) }}">
                                        <span class="label label-danger">
                                            <i class="glyphicon glyphicon-remove"></i>
                                        </span>
                                    </a>
                                {% else %}
                                    {% set parameter = subject_filters|merge([subject.key]) %}
                                    <a href="{{ path('people_index', {
                                        subject_filters: parameter|join(','),
                                        role_filters: app.request.get('role_filters'),
                                        journal_filters: app.request.get('journal_filters')}) }}">{{ subject.key }}</a>
                                {% endif %}
                            {% endif %}
                            <span class="badge">{{ subject.doc_count }}</span>
                        </li>
                    {% endfor %}
                </ul>
            </div>

            <div class="panel panel-primary">
                <div class="panel-heading"><h4>{{ 'journals'|trans }}</h4></div>
                <ul class="list-group">
                    {% for journal in journals %}
                        <li class="list-group-item">
                            {% if journal_filters is empty %}
                                {% set parameter = journal.key %}
                                <a href="{{ path('people_index', {
                                    journal_filters: journal.key,
                                    role_filters: app.request.get('role_filters'),
                                    subject_filters: app.request.get('subject_filters')}) }}">{{ journal.key }}</a>
                            {% else %}
                                {% if journal.key in journal_filters %}
                                    {% set parameter = journal_filters|pop(journal.key) %}
                                    {{ journal.key }}
                                    <a href="{{ path('people_index', {
                                        journal_filters: parameter|join(','),
                                        role_filters: app.request.get('role_filters'),
                                        subject_filters: app.request.get('subject_filters')}) }}">
                                        <span class="label label-danger">
                                            <i class="glyphicon glyphicon-remove"></i>
                                        </span>
                                    </a>
                                {% else %}
                                    {% set parameter = journal_filters|merge([journal.key]) %}
                                    <a href="{{ path('people_index', {
                                        journal_filters: parameter|join(','),
                                        role_filters: app.request.get('role_filters'),
                                        subject_filters: app.request.get('subject_filters')}) }}">{{ journal.key }}</a>
                                {% endif %}
                            {% endif %}
                            <span class="badge">{{ journal.doc_count }}</span>
                        </li>
                    {% endfor %}
                </ul>
            </div>

            <div class="panel panel-primary">
                <div class="panel-heading"><h4>{{ 'roles'|trans }}</h4></div>
                <ul class="list-group">
                    {% for role in roles %}
                        <li class="list-group-item">
                            {% if role_filters is empty %}
                                {% set parameter = role.key %}
                                <a href="{{ path('people_index', {
                                    role_filters: role.key,
                                    subject_filters: app.request.get('subject_filters'),
                                    journal_filters: app.request.get('journal_filters') }) }}">{{ role.key|trans }}</a>
                            {% else %}
                                {% if role.key in role_filters %}
                                    {% set parameter = role_filters|pop(role.key) %}
                                    {{ role.key|trans }}
                                    <a href="{{ path('people_index', {
                                        role_filters: parameter|join(','),
                                        subject_filters: app.request.get('subject_filters'),
                                        journal_filters: app.request.get('journal_filters')}) }}">
                                        <span class="label label-danger">
                                            <i class="glyphicon glyphicon-remove"></i>
                                        </span>
                                    </a>
                                {% else %}
                                    {% set parameter = role_filters|merge([role.key]) %}
                                    <a href="{{ path('people_index', {
                                        role_filters: parameter|join(','),
                                        subject_filters: app.request.get('subject_filters'),
                                        journal_filters: app.request.get('journal_filters')}) }}">{{ role.key|trans }}</a>
                                {% endif %}
                            {% endif %}
                            <span class="badge">{{ role.doc_count }}</span>
                        </li>
                    {% endfor %}
                </ul>
            </div>
        </div>
    </div>

    <div class="col-sm-9">
    {% for person in people %}
        <div class="well col-sm-3" style="height: 20em; margin: 0 0 10px 10px;">
            <div class="text-center">
                <a href="/@{{ person.username }}" class="thumbnail">
                    <img class="img-circle"
                         src="{{ person.avatar is defined ? '/uploads/avatarfiles/' ~ imagePath(person.avatar) : '#' }}"
                         alt="{{ person.username|default('image'|trans) }}"
                         data-src="holder.js/100x100/random"
                         style="width: 100px; height: 100px;">
                </a>

                <h3>
                    <a href="/@{{ person.username|default('') }}">
                    {% if person.firstName is defined and person.lastName is defined  %}
                        {{ person.firstName|default('') }} {{ person.lastName|default('') }}
                    {% else %}
                        {{ person.username }}
                    {% endif %}
                    </a>
                </h3>
            </div>
        </div>
    {% endfor %}
    </div>
</div>
<div class="text-center">
    <ul class="pagination">
        {{ pagerfanta(pagerfanta,'twitter_bootstrap3') }}
    </ul>
</div>
{% endblock %}
{'fraction_non_alphanumeric': 0.1327536552946389, 'fraction_numerical': 0.003433761630482942, 'mean_word_length': 0.9657086871325931, 'pattern_counts': {'":': 0, '<': 195, '<?xml version=': 0, '>': 195, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 144, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3869021', 'n_tokens_mistral': 4256, 'n_tokens_neox': 3819, 'n_words': 743}