stevotvr/phpbb-groupsub

View on GitHub
adm/style/subscription_list.html

Summary

Maintainability
Test Coverage
{% if package|length > 1 %}
<form id="sub_filter" method="post" action="{{ U_ACTION }}">
    <fieldset class="quick">
        {{ lang('ACP_GROUPSUB_PKG') ~ lang('COLON') }}
        <select name="pkg_id" id="pkg_id">
            <option value="0">{{ lang('ACP_GROUPSUB_ALL_PACKAGES') }}</option>
    {% for p in package %}
            <option value="{{ p.ID }}"{% if p.S_SELECTED %} selected{% endif %}>{{ p.NAME }}</option>
    {% endfor %}
        </select>
        <input class="button2" type="submit" name="filter" value="{{ lang('GO') }}">
    </fieldset>
</form>
{% endif %}

<table class="table1 zebra-table responsive">
    <thead>
        <tr>
{% if S_SHOW_USER %}
            <th width="20%">{{ lang('ACP_GROUPSUB_USER') }}</th>
{% endif %}
            <th width="{% if S_SHOW_USER %}2{% else %}4{% endif %}0%">{{ lang('ACP_GROUPSUB_SUB') }}</th>
            <th width="20%">{{ lang('ACP_GROUPSUB_START') }}</th>
            <th width="20%">{{ lang('ACP_GROUPSUB_EXPIRES') }}</th>
            <th width="10%">{{ lang('ACP_GROUPSUB_STATUS') }}</th>
            <th width="10%">{{ lang('ACTION') }}</th>
        </tr>
    </thead>
    <tbody>
{% for s in subscription %}
        <tr>
    {% if S_SHOW_USER %}
            <td>{{ s.USER }}</td>
    {% endif %}
            <td>{% if s.S_PACKAGE_DELETED %}<i>{{ s.PACKAGE }} ({{ lang('ACP_GROUPSUB_DELETED') }})</i>{% else %}{{ s.PACKAGE }}{% endif %}</td>
            <td>{{ s.STARTED }}</td>
            <td>{% if s.EXPIRES %}{{ s.EXPIRES }}{% else %}<i>{{ lang('ACP_GROUPSUB_EXPIRES_NEVER') }}</i>{% endif %}</td>
            <td>{% if s.S_ACTIVE %}<b style="color: #00d600;">{{ lang('ACP_GROUPSUB_ACTIVE') }}</b>{% else %}<i style="color: #f00;">{{ lang('ACP_GROUPSUB_ENDED') }}</i>{% endif %}</td>
            <td class="actions">
                <a href="{{ s.U_EDIT }}">{{ ICON_EDIT }}</a>
    {% if not S_READ_ONLY and s.S_ACTIVE %}
                <a href="{{ s.U_DELETE }}" data-ajax="row_delete">{{ ICON_DELETE }}</a>
    {% else %}
                <a>{{ ICON_DELETE_DISABLED }}</a>
    {% endif %}
            </td>
        </tr>
{% else %}
        <tr><td colspan="{% if S_SHOW_USER %}6{% else %}5{% endif %}" style="text-align: center;">{{ lang('ACP_GROUPSUB_NO_SUBS') }}</td></tr>
{% endfor %}
    </tbody>
</table>

<form id="sub_sort" method="post" action="{{ U_ACTION }}">
    <fieldset class="display-options">
        {{ lang('SORT_BY') ~ lang('COLON') }}
        <select name="sk" id="sk">
{% for k in sort_key %}
            <option value="{{ k.KEY }}"{% if k.S_SELECTED %} selected{% endif %}>{{ k.NAME }}</option>
{% endfor %}
        </select>
        <select name="sd" id="sd">
{% for d in sort_dir %}
            <option value="{{ d.KEY }}"{% if d.S_SELECTED %} selected{% endif %}>{{ d.NAME }}</option>
{% endfor %}
        </select>
{% if pagination %}
        {{ lang('ACP_GROUPSUB_ITEMS_PER_PAGE') ~ lang('COLON') }}
        <input class="inputbox autowidth" type="number" name="limit" id="limit" min="0" max="100" value="{{ LIMIT }}">
{% endif %}
        <input class="button2" type="submit" name="sort" value="{{ lang('GO') }}">
    </fieldset>
</form>

<hr>

{% if pagination %}
<div class="pagination">
    {% include 'pagination.html' %}
</div>
{% endif %}

{% if not S_READ_ONLY and S_SHOW_ADD %}
<form id="sub_add" method="post" action="{{ U_ADD_SUB }}">
    <fieldset class="quick">
        <input type="hidden" name="sub_package" value="{{ PKG_ID }}">
        <input class="button2" type="submit" name="add" value="{{ lang('ACP_GROUPSUB_SUB_ADD') }}">
    </fieldset>
</form>
{% endif %}