mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 23:42:11 +00:00
show quota
This commit is contained in:
parent
d63a6e0977
commit
1f5b44a654
|
@ -36,6 +36,7 @@ class SeedDMS_View_UserList extends SeedDMS_Bootstrap_Style {
|
||||||
$user = $this->params['user'];
|
$user = $this->params['user'];
|
||||||
$allUsers = $this->params['allusers'];
|
$allUsers = $this->params['allusers'];
|
||||||
$httproot = $this->params['httproot'];
|
$httproot = $this->params['httproot'];
|
||||||
|
$quota = $this->params['quota'];
|
||||||
|
|
||||||
$this->htmlStartPage(getMLText("admin_tools"));
|
$this->htmlStartPage(getMLText("admin_tools"));
|
||||||
$this->globalNavigation();
|
$this->globalNavigation();
|
||||||
|
@ -70,13 +71,33 @@ class SeedDMS_View_UserList extends SeedDMS_Bootstrap_Style {
|
||||||
}
|
}
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
echo "<td>";
|
echo "<td>";
|
||||||
|
echo SeedDMS_Core_File::format_filesize($currUser->getUsedDiskSpace());
|
||||||
|
if($quota) {
|
||||||
|
if($user->getQuota() > $currUser->getUsedDiskSpace()) {
|
||||||
|
$used = (int) ($currUser->getUsedDiskSpace()/$currUser->getQuota()*100.0+0.5);
|
||||||
|
$free = 100-$used;
|
||||||
|
} else {
|
||||||
|
$free = 0;
|
||||||
|
$used = 100;
|
||||||
|
}
|
||||||
|
echo " / ";
|
||||||
if($currUser->getQuota() != 0)
|
if($currUser->getQuota() != 0)
|
||||||
echo SeedDMS_Core_File::format_filesize($currUser->getQuota())."<br />";
|
echo SeedDMS_Core_File::format_filesize($currUser->getQuota())."<br />";
|
||||||
echo SeedDMS_Core_File::format_filesize($currUser->getUsedDiskSpace())."<br />";
|
else
|
||||||
|
echo SeedDMS_Core_File::format_filesize($quota)."<br />";
|
||||||
|
?>
|
||||||
|
<div class="progress">
|
||||||
|
<div class="bar bar-danger" style="width: <?php echo $used; ?>%;"></div>
|
||||||
|
<div class="bar bar-success" style="width: <?php echo $free; ?>%;"></div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
echo "<td>";
|
echo "<td>";
|
||||||
|
echo "<div class=\"list-action\">";
|
||||||
echo "<a href=\"../out/out.UsrMgr.php?userid=".$currUser->getID()."\"><i class=\"icon-edit\"></i></a> ";
|
echo "<a href=\"../out/out.UsrMgr.php?userid=".$currUser->getID()."\"><i class=\"icon-edit\"></i></a> ";
|
||||||
echo "<a href=\"../out/out.RemoveUser.php?userid=".$currUser->getID()."\"><i class=\"icon-remove\"></i></a>";
|
echo "<a href=\"../out/out.RemoveUser.php?userid=".$currUser->getID()."\"><i class=\"icon-remove\"></i></a>";
|
||||||
|
echo "</div>";
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user