1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-08 18:05:17 +02:00

[ticket/15689] Show statistics of storages on acp_storage

PHPBB3-15689
This commit is contained in:
Rubén Calvo 2018-06-12 09:44:53 +02:00
parent 5087d5d6b6
commit 584d03a9fe
3 changed files with 27 additions and 0 deletions

View File

@ -6,6 +6,28 @@
<p>{{ lang('STORAGE_TITLE_EXPLAIN') }}</p>
<table class="table1 zebra-table">
<thead>
<tr>
<th>{L_STORAGE_NAME}</th>
<th>{L_STORAGE_NUM_FILES}</th>
<th>{L_STORAGE_SIZE}</th>
<th>{L_STORAGE_FREE}</th>
</tr>
</thead>
<tbody>
{% for storage in STORAGES %}
<tr>
<td>{{ lang('STORAGE_' ~ storage.get_name | upper ~ '_TITLE') }}</td>
<td>{{ storage.get_num_files }}</td>
<td>{{ storage.get_size | format_bytes }}</td>
<td>{{ storage.free_space | format_bytes }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<form id="acp_storage" method="post" action="{{ U_ACTION }}">
{% for storage in STORAGES %}

View File

@ -43,6 +43,10 @@ $lang = array_merge($lang, array(
'STORAGE_TITLE_EXPLAIN' => 'Change storage providers for the file storage types of phpBB. Choose local or remote providers to store files added to or created by phpBB.',
'STORAGE_SELECT' => 'Select storage',
'STORAGE_SELECT_DESC' => 'Select a storage from the list.',
'STORAGE_NAME' => 'Storage name',
'STORAGE_NUM_FILES' => 'Number of files',
'STORAGE_SIZE' => 'Size',
'STORAGE_FREE' => 'Available space',
// Storage names
'STORAGE_ATTACHMENT_TITLE' => 'Attachments storage',

View File

@ -73,6 +73,7 @@ class extension extends \Twig_Extension
new \Twig_SimpleFilter('subset', array($this, 'loop_subset'), array('needs_environment' => true)),
// @deprecated 3.2.0 Uses twig's JS escape method instead of addslashes
new \Twig_SimpleFilter('addslashes', 'addslashes'),
new \Twig_SimpleFilter('format_bytes', 'get_formatted_filesize'),
);
}