{% if class == 'Status' %}
    <div class="ui icon info visible message">
        <i class="info circle blue icon"></i>
        <div class="content">
            {{ _T("Note: members with a status priority lower than %priority are staff members.")|replace({'%priority': non_staff_priority}) }}
        </div>
    </div>
{% endif %}
    <div class="ui basic fitted segment loader_selector">
        <table class="listing ui celled striped table">
            <thead>
                <tr>
                    <th class="id_row">#</th>
                    <th>{{ _T("Name") }}</th>
{% if class == 'ContributionsTypes' %}
                    <th>{{ _T("Extends membership?") }}</th>
{% elseif class == 'Status' %}
                    <th>{{ _T("Priority") }}</th>
{% endif %}
                    <th>{{ _T("Actions") }}</th>
                </tr>
            </thead>
            <tfoot>
                <tr>
                    <td data-scope="row">
                        <span class="displaynone">
{% if class == 'Status' %}
                            {{ _T("New status") }}
{% else %}
                            {{ _T("New contribution type") }}
{% endif %}
                        </span>
                    </td>
                    <td class="left" data-title="{{ _T("Name") }}">
                        <div class="required field">
                            <label for="name" class="displaynone">{{ _T("Name") }}</label>
                            <input size="40" type="text" name="{{ fields.libelle }}" required="required"/>
                        </div>
                    </td>
                    <td class="left" data-title="{% if class == 'ContributionsTypes' %}{{ _T("Extends membership?") }}{% else %}{{ _T("Priority") }}{% endif %}">
{% if class == 'ContributionsTypes' %}
                        <select name="{{ fields.third }}" class="ui dropdown nochosen">
                            <option value="0" selected="selected">{{ _T("No") }}</option>
                            <option value="1">{{ _T("Yes") }}</option>
                        </select>
{% elseif class == 'Status' %}
                        <input size="4" type="text" name="{{ fields.third }}" value="99" />
{% endif %}
                    </td>
                    <td class="center actions_row">
                        <input type="hidden" name="new" value="1" />
                        <input type="hidden" name="class" value="{{ class }}" />
                        <button type="submit" name="valid" class="ui labeled icon button">
                            <i class="plus green icon" aria-hidden="true"></i>
                            {{ _T("Add") }}
                        </button>
                    </td>
                </tr>
            </tfoot>
            <tbody>
{% for eid, entry in entries %}
                <tr>
                    <td data-scope="row">
                        {{ eid }}
                        <span class="displaynone">
                            <a href="{{ url_for('editEntitled', {'class': url_class, 'action': 'edit', 'id': eid}) }}">
                                {{ _T("%s field")|replace({'%s': entry.name|escape}) }}
                            </a>
                        </span>
                    </td>
                    <td class="left" data-title="{{ _T("Name") }}">
                        {% if class == 'Status' %}
                            {% if entry.extra < 30 %}
                                <span>
                                    <i class="ui user tie icon tooltip"></i>
                                    <span class="ui special popup">{{ _T("Staff member") }}</span>
                                </span>
                            {% else %}
                                <i class="ui icon">&nbsp;</i>
                            {% endif %}
                        {% endif %}
                        {{ entry.name|escape }}
                    </td>
                    <td data-title="{% if class == 'ContributionsTypes' %}{{ _T("Extends membership?") }}{% else %}{{ _T("Priority") }}{% endif %}">
    {% if class == 'ContributionsTypes' %}
        {% if entry.extra == 1 %}
                            {{ _T("Yes") }}
        {% else %}
                            {{ _T("No") }}
        {% endif %}
    {% elseif class == 'Status' %}
                        {{ entry.extra }}
    {% endif %}
                    </td>
                    <td class="center actions_row">
                        <a
                            href="{{ url_for('editEntitled', {'class': url_class, 'action': 'edit', 'id': eid}) }}"
                            class="action single-edit"
                        >
                            <i class="ui edit icon tooltip"></i>
                            <span class="ui special popup">{{ _T("Edit '%s' field")|replace({'%s': entry.name|escape}) }}</span>
                        </a>
                        <a
                            href="{{ url_for('removeEntitled', {'class': url_class, 'id': eid}) }}"
                            class="delete"
                        >
                            <i class="ui trash red icon tooltip"></i>
                            <span class="ui special popup">{{ _T("Delete '%s' field")|replace({'%s': entry.name|escape}) }}</span>
                        </a>
                    </td>
                </tr>
{% endfor %}
            </tbody>
        </table>
    </div>
