use table layout

This commit is contained in:
Uwe Steinmann 2025-11-21 13:30:45 +01:00
parent 722f816734
commit 39ec0618c7

View File

@ -9,7 +9,7 @@
* @author Uwe Steinmann <uwe@steinmann.cx> * @author Uwe Steinmann <uwe@steinmann.cx>
* @copyright Copyright (C) 2002-2005 Markus Westphal, * @copyright Copyright (C) 2002-2005 Markus Westphal,
* 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
* 2010-2012 Uwe Steinmann * 2010-2025 Uwe Steinmann
* @version Release: @package_version@ * @version Release: @package_version@
*/ */
@ -26,13 +26,17 @@
* @author Markus Westphal, Malcolm Cowe, Uwe Steinmann <uwe@steinmann.cx> * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann <uwe@steinmann.cx>
* @copyright Copyright (C) 2002-2005 Markus Westphal, * @copyright Copyright (C) 2002-2005 Markus Westphal,
* 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
* 2010-2012 Uwe Steinmann * 2010-2025 Uwe Steinmann
* @version Release: @package_version@ * @version Release: @package_version@
*/ */
class SeedDMS_View_ClearCache extends SeedDMS_Theme_Style { class SeedDMS_View_ClearCache extends SeedDMS_Theme_Style {
protected function output($name, $title, $space, $c) { protected function output($name, $title, $space, $c) {
echo '<p><input type="checkbox" name="'.$name.'" value="1" checked> '.$title.($space !== NULL || $c != NULL ? '<br />' : '').($space !== NULL ? SeedDMS_Core_File::format_filesize($space) : '').($c !== NULL ? ' in '.$c.' Files' : '').'</p>'; echo '<tr><td><input type="checkbox" name="'.$name.'" value="1" checked></td>';
echo '<td>'.$title.'</td>';
echo '<td>'.($space !== NULL ? SeedDMS_Core_File::format_filesize($space) : '').'</td>';
echo '<td>'.($c !== NULL ? $c : '').'</td>';
echo '</tr>';
} }
function show() { /* {{{ */ function show() { /* {{{ */
@ -49,9 +53,11 @@ class SeedDMS_View_ClearCache extends SeedDMS_Theme_Style {
?> ?>
<form action="../op/op.ClearCache.php" name="form1" method="post"> <form action="../op/op.ClearCache.php" name="form1" method="post">
<?php echo createHiddenFieldWithKey('clearcache'); ?> <?php echo createHiddenFieldWithKey('clearcache'); ?>
<?php <table class="table table-sm table-condensed table-hover">
$this->contentContainerStart('warning'); <thead>
?> <tr><th></th><th>Cache</th><th>Size</th><th>Files</th></tr>
</thead>
<tbody>
<?php <?php
$totalc = 0; $totalc = 0;
$totalspace = 0; $totalspace = 0;
@ -92,8 +98,15 @@ class SeedDMS_View_ClearCache extends SeedDMS_Theme_Style {
$totalspace += $c[2]; $totalspace += $c[2];
} }
} }
$this->contentContainerEnd(); ?>
$this->infoMsg(SeedDMS_Core_File::format_filesize($totalspace).' in '.$totalc.' Files'); </tbody>
<tfoot>
<?php
echo '<tr><th></th><th></th><th>'.SeedDMS_Core_File::format_filesize($totalspace).'</th><th>'.$totalc.'</th></tr>';
?>
</tfoot>
</table>
<?php
$this->formSubmit("<i class=\"fa fa-remove\"></i> ".getMLText('clear_cache'), '', '', 'danger'); $this->formSubmit("<i class=\"fa fa-remove\"></i> ".getMLText('clear_cache'), '', '', 'danger');
?> ?>
</form> </form>
@ -102,4 +115,3 @@ class SeedDMS_View_ClearCache extends SeedDMS_Theme_Style {
$this->htmlEndPage(); $this->htmlEndPage();
} /* }}} */ } /* }}} */
} }
?>