databases_footer.twig 2.37 KB
Newer Older
Hamza Arfaoui's avatar
Hamza Arfaoui committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
<tfoot>
    <tr>
        {% if is_superuser or allow_user_drop_database %}
            <th></th>
        {% endif %}
        <th>
            {% trans 'Total' %}: <span id="filter-rows-count">
                {{- database_count -}}
            </span>
        </th>
        {% for stat_name, stat in column_order if stat_name in first_database|keys %}
            {% if stat['format'] is same as('byte') %}
                {% set byte_format = Util_formatByteDown(stat['footer'], 3, 1) %}
                {% set value = byte_format[0] %}
                {% set unit = byte_format[1] %}
            {% elseif stat['format'] is same as('number') %}
                {% set value = Util_formatNumber(stat['footer'], 0) %}
            {% else %}
                {% set value = htmlentities(stat['footer'], 0) %}
            {% endif %}

            <th class="value">
                {% if stat['description_function'] is defined %}
                    <dfn title="{{ Charsets_getCollationDescr(stat['footer']) }}">
                        {{ value }}
                    </dfn>
                {% else %}
                    {{ value }}
                {% endif %}
            </th>
            {% if stat['format'] is same as('byte') %}
                <th class="unit">{{ unit }}</th>
            {% endif %}
        {% endfor %}
        {% if master_replication %}
            <th></th>
        {% endif %}
        {% if slave_replication %}
            <th></th>
        {% endif %}
        <th></th>
    </tr>
</tfoot>
</table>
</div>

{# Footer buttons #}
{% if is_superuser or allow_user_drop_database %}
    {% include 'select_all.twig' with {
        'pma_theme_image': pma_theme_image,
        'text_dir': text_dir,
        'form_name': 'dbStatsForm'
    } only %}

    {{ Util_getButtonOrImage(
        '',
        'mult_submit ajax',
        'Drop'|trans,
        'b_deltbl'
    ) }}
{% endif %}

{# Enable statistics #}
{% if dbstats is empty %}
    {{ Message_notice('Note: Enabling the database statistics here might cause heavy traffic between the web server and the MySQL server.'|trans) }}
    <ul>
        <li class="li_switch_dbstats">
            <a href="server_databases.php" data-post="{{ Url_getCommon({'dbstats': '1'}, '') }}" title="{% trans 'Enable statistics' %}">
                <strong>{% trans 'Enable statistics' %}</strong>
            </a>
        </li>
    </ul>
{% endif %}
</form>
</div>