<commit_before>{% extends 'base.html.twig' %}

{% block title %}Participants{% endblock %}

{% block body %}
    <nav class="breadcrumb">
        <a class="breadcrumb-item" href="/">Home</a>
        <a class="breadcrumb-item" href="{{ path('activity_index') }}">Activities</a>
        <a class="breadcrumb-item" href="{{ path('activity_view', { id: activity.id }) }}">{{ activity.name }}</a>
        <span class="breadcrumb-item active">Participants</span>
    </nav>

    <h2>Participants</h2>

    <table class="table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Mobile</th>
                <th>Notes</th>
                <th>Next of Kin</th>
            </tr>
        </thead>

        <tbody>
            {% for participant in activity.participant %}
                <tr>
                    <td>{{ participant.person.name }}</td>
                    <td>{{ participant.person.mobile }}</td>
                    <td>{{ participant.notes }}</td>
                    <td><a href="#" class="nok" title="{{ participant.person.nextofKinName }} ({{ participant.person.nextofKinRelation }})" data-content="{{ participant.person.nextOfKinContactDetails }}">{{ participant.person.nextofKinName }}</a></td>
                </tr>
            {% else %}
                <tr>
                    <td colspan="2">No one has signed up yet</td>
                </tr>
            {% endfor %}
        </tbody>
    </table>

    {% if app.user == activity.organiser %}
        <a href="{{ path('activity_participants_add', { id: activity.id })}}" class="btn btn-primary">Add Participant</a>
    {% endif %}

{% endblock %}

{% block javascripts %}
<script>
$('.nok').popover({
  trigger: 'hover'
})
</script>
{% endblock %}<commit_msg>Display Add Participants button to admins<commit_after>{% extends 'base.html.twig' %}

{% block title %}Participants{% endblock %}

{% block body %}
    <nav class="breadcrumb">
        <a class="breadcrumb-item" href="/">Home</a>
        <a class="breadcrumb-item" href="{{ path('activity_index') }}">Activities</a>
        <a class="breadcrumb-item" href="{{ path('activity_view', { id: activity.id }) }}">{{ activity.name }}</a>
        <span class="breadcrumb-item active">Participants</span>
    </nav>

    <h2>Participants</h2>

    <table class="table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Mobile</th>
                <th>Notes</th>
                <th>Next of Kin</th>
            </tr>
        </thead>

        <tbody>
            {% for participant in activity.participant %}
                <tr>
                    <td>{{ participant.person.name }}</td>
                    <td>{{ participant.person.mobile }}</td>
                    <td>{{ participant.notes }}</td>
                    <td><a href="#" class="nok" title="{{ participant.person.nextofKinName }} ({{ participant.person.nextofKinRelation }})" data-content="{{ participant.person.nextOfKinContactDetails }}">{{ participant.person.nextofKinName }}</a></td>
                </tr>
            {% else %}
                <tr>
                    <td colspan="2">No one has signed up yet</td>
                </tr>
            {% endfor %}
        </tbody>
    </table>

    {% if app.user == activity.organiser or is_granted('ROLE_ADMIN') %}
        <a href="{{ path('activity_participants_add', { id: activity.id })}}" class="btn btn-primary">Add Participant</a>
    {% endif %}

{% endblock %}

{% block javascripts %}
<script>
$('.nok').popover({
  trigger: 'hover'
})
</script>
{% endblock %}
{'fraction_non_alphanumeric': 0.18669647847959753, 'fraction_numerical': 0.0016769144773616546, 'mean_word_length': 2.027918781725888, 'pattern_counts': {'":': 0, '<': 99, '<?xml version=': 0, '>': 99, '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': '6981362', 'n_tokens_mistral': 1164, 'n_tokens_neox': 1036, 'n_words': 215}