mirror of
				https://git.code.sf.net/p/seeddms/code
				synced 2025-10-31 13:18:06 +00:00 
			
		
		
		
	show quota on chart page when listing total document size per user
This commit is contained in:
		
							parent
							
								
									d4bfb539b7
								
							
						
					
					
						commit
						d9a2ea5303
					
				|  | @ -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 | ||||
|  |  | |||
|  | @ -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; | ||||
| } | ||||
|  |  | |||
|  | @ -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( | ||||
| 			'<script type="text/javascript" src="../styles/bootstrap/flot/jquery.flot.min.js"></script>'."\n". | ||||
|  | @ -285,8 +286,12 @@ $(document).ready( function() { | |||
| 		$this->contentContainerEnd(); | ||||
| 		echo "<table class=\"table table-condensed table-sm table-hover\">"; | ||||
| 		echo "<tr>"; | ||||
| 		echo "<th>".getMLText('chart_'.$type.'_title')."</th><th>".getMLText('total')."</th>"; | ||||
| 		if(in_array($type, array('docspermonth', 'docsaccumulated'))) | ||||
| 		echo "<th>".getMLText('chart_'.$type.'_title')."</th>"; | ||||
| 		echo "<th>".getMLText('total')."</th>"; | ||||
| 		$types = array('docspermonth', 'docsaccumulated'); | ||||
| 		if($quota) | ||||
| 			$types[] = 'sizeperuser'; | ||||
| 		if(in_array($type, $types)) | ||||
| 			echo "<th></th>"; | ||||
| 		echo "</tr>"; | ||||
| 		$total = 0; | ||||
|  | @ -323,6 +328,21 @@ $(document).ready( function() { | |||
| 			} | ||||
| 			break; | ||||
| 		case 'sizeperuser': | ||||
| 			foreach($data as $item) { | ||||
| 				$currUser = $dms->getUser($item['res']); | ||||
| 				echo "<tr><td>".htmlspecialchars($item['key'])."</td>"; | ||||
| 				echo "<td>".SeedDMS_Core_File::format_filesize((int) $item['total'])."</td>"; | ||||
| 				if($quota) { | ||||
| 					echo "<td width=\"100\">"; | ||||
| 					$qt = $currUser->getQuota() ? $currUser->getQuota() : $quota; | ||||
| 					echo $this->getProgressBar($currUser->getUsedDiskSpace(), $qt); | ||||
| 					echo "</td>"; | ||||
| 				} | ||||
| 				echo "</tr>"; | ||||
| 				$total += $item['total']; | ||||
| 			} | ||||
| 			echo "<tr><th></th><th>".SeedDMS_Core_File::format_filesize($total)."<th></tr>"; | ||||
| 			break; | ||||
| 		case 'sizepermonth': | ||||
| 			foreach($data as $item) { | ||||
| 				echo "<tr><td>".htmlspecialchars($item['key'])."</td><td>".SeedDMS_Core_File::format_filesize((int) $item['total'])."</td></tr>"; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Uwe Steinmann
						Uwe Steinmann