diff --git a/CHANGELOG b/CHANGELOG index 94e0df855..b001e24c4 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ -------------------------------------------------------------------------------- Changes in version 5.1.39 -------------------------------------------------------------------------------- +- show quota on chart page when listing total document size per user -------------------------------------------------------------------------------- Changes in version 5.1.38 diff --git a/out/out.Charts.php b/out/out.Charts.php index 6988c4fab..2aa0a7fe9 100644 --- a/out/out.Charts.php +++ b/out/out.Charts.php @@ -53,6 +53,7 @@ if ($view) { $view->setParam('type', $type); $view->setParam('data', $data); $view->setParam('accessobject', $accessop); + $view->setParam('quota', $settings->_quota); $view($_GET); exit; } diff --git a/views/bootstrap/class.Charts.php b/views/bootstrap/class.Charts.php index e9f7f6749..549c94c23 100644 --- a/views/bootstrap/class.Charts.php +++ b/views/bootstrap/class.Charts.php @@ -249,6 +249,7 @@ $(document).ready( function() { $user = $this->params['user']; $data = $this->params['data']; $type = $this->params['type']; + $quota = $this->params['quota']; $this->htmlAddHeader( ''."\n". @@ -285,8 +286,12 @@ $(document).ready( function() { $this->contentContainerEnd(); echo "
".getMLText('chart_'.$type.'_title')." | ".getMLText('total')." | "; - if(in_array($type, array('docspermonth', 'docsaccumulated'))) + echo "".getMLText('chart_'.$type.'_title')." | "; + echo "".getMLText('total')." | "; + $types = array('docspermonth', 'docsaccumulated'); + if($quota) + $types[] = 'sizeperuser'; + if(in_array($type, $types)) echo ""; echo " |
---|---|---|---|---|
".htmlspecialchars($item['key'])." | "; + echo "".SeedDMS_Core_File::format_filesize((int) $item['total'])." | "; + if($quota) { + echo ""; + $qt = $currUser->getQuota() ? $currUser->getQuota() : $quota; + echo $this->getProgressBar($currUser->getUsedDiskSpace(), $qt); + echo " | "; + } + echo "||
".SeedDMS_Core_File::format_filesize($total)." | ||||
".htmlspecialchars($item['key'])." | ".SeedDMS_Core_File::format_filesize((int) $item['total'])." |