mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 23:24:57 +00:00
add method info(), place output of info below user selection
This commit is contained in:
parent
139b498d14
commit
26819ce00e
|
@ -31,6 +31,30 @@ require_once("class.Bootstrap.php");
|
|||
*/
|
||||
class SeedDMS_View_UsrMgr extends SeedDMS_Bootstrap_Style {
|
||||
|
||||
function info() { /* {{{ */
|
||||
$dms = $this->params['dms'];
|
||||
$seluser = $this->params['seluser'];
|
||||
$quota = $this->params['quota'];
|
||||
|
||||
$sessionmgr = new SeedDMS_SessionMgr($dms->getDB());
|
||||
|
||||
$this->contentHeading(getMLText("user_info"));
|
||||
echo "<table class=\"table table-condensed\">\n";
|
||||
echo "<tr><td>".getMLText('discspace')."</td><td>";
|
||||
$qt = $seluser->getQuota() ? $seluser->getQuota() : $quota;
|
||||
echo SeedDMS_Core_File::format_filesize($seluser->getUsedDiskSpace())." / ".SeedDMS_Core_File::format_filesize($qt)."<br />";
|
||||
echo $this->getProgressBar($seluser->getUsedDiskSpace(), $qt);
|
||||
echo "</td></tr>\n";
|
||||
$documents = $seluser->getDocuments();
|
||||
echo "<tr><td>".getMLText('documents')."</td><td>".count($documents)."</td></tr>\n";
|
||||
$sessions = $sessionmgr->getUserSessions($seluser);
|
||||
if($sessions) {
|
||||
$session = array_shift($sessions);
|
||||
echo "<tr><td>".getMLText('lastaccess')."</td><td>".getLongReadableDate($session->getLastAccess())."</td></tr>\n";
|
||||
}
|
||||
echo "</table>";
|
||||
} /* }}} */
|
||||
|
||||
function form() { /* {{{ */
|
||||
$seluser = $this->params['seluser'];
|
||||
|
||||
|
@ -418,6 +442,7 @@ function showUser(selectObj) {
|
|||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="ajax" data-view="UsrMgr" data-action="info"></div>
|
||||
</div>
|
||||
|
||||
<div class="span8">
|
||||
|
|
Loading…
Reference in New Issue
Block a user