mirror of
				https://git.code.sf.net/p/seeddms/code
				synced 2025-10-31 05:11:27 +00:00 
			
		
		
		
	add Dashboard
This commit is contained in:
		
							parent
							
								
									a557e98927
								
							
						
					
					
						commit
						7c836e0d41
					
				
							
								
								
									
										30
									
								
								out/out.Dashboard.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								out/out.Dashboard.php
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,30 @@ | |||
| <?php | ||||
| if(!isset($settings)) | ||||
| 	require_once("../inc/inc.Settings.php"); | ||||
| require_once("inc/inc.Utils.php"); | ||||
| require_once("inc/inc.LogInit.php"); | ||||
| require_once("inc/inc.Language.php"); | ||||
| require_once("inc/inc.Init.php"); | ||||
| require_once("inc/inc.Extension.php"); | ||||
| require_once("inc/inc.DBInit.php"); | ||||
| require_once("inc/inc.Authentication.php"); | ||||
| require_once("inc/inc.ClassUI.php"); | ||||
| 
 | ||||
| $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); | ||||
| $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); | ||||
| $accessop = new SeedDMS_AccessOperation($dms, null, $user, $settings); | ||||
| 
 | ||||
| if($view) { | ||||
| 	$view->setParam('fulltextservice', $fulltextservice); | ||||
| 	$view->setParam('conversionmgr', $conversionmgr); | ||||
| 	$view->setParam('showtree', showtree()); | ||||
| 	$view->setParam('settings', $settings); | ||||
| 	$view->setParam('cachedir', $settings->_cacheDir); | ||||
| 	$view->setParam('previewWidthList', $settings->_previewWidthList); | ||||
| 	$view->setParam('previewConverters', isset($settings->_converters['preview']) ? $settings->_converters['preview'] : array()); | ||||
| 	$view->setParam('timeout', $settings->_cmdTimeout); | ||||
| 	$view->setParam('accessobject', $accessop); | ||||
| 	$view->setParam('xsendfile', $settings->_enableXsendfile); | ||||
| 	$view($_GET); | ||||
| 	exit; | ||||
| } | ||||
							
								
								
									
										176
									
								
								views/bootstrap/class.Dashboard.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										176
									
								
								views/bootstrap/class.Dashboard.php
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,176 @@ | |||
| <?php | ||||
| /** | ||||
|  * Implementation of Dashboard view | ||||
|  * | ||||
|  * @category   DMS | ||||
|  * @package    SeedDMS | ||||
|  * @license    GPL 2 | ||||
|  * @version    @version@ | ||||
|  * @author     Uwe Steinmann <uwe@steinmann.cx> | ||||
|  * @copyright  Copyright (C) 2010-2023 Uwe Steinmann | ||||
|  * @version    Release: @package_version@ | ||||
|  */ | ||||
| 
 | ||||
| /** | ||||
|  * Class which outputs the html page for Dashboard view | ||||
|  * | ||||
|  * @category   DMS | ||||
|  * @package    SeedDMS | ||||
|  * @author     Markus Westphal, Malcolm Cowe, Uwe Steinmann <uwe@steinmann.cx> | ||||
|  * @copyright  Copyright (C) 2010-2023 Uwe Steinmann | ||||
|  * @version    Release: @package_version@ | ||||
|  */ | ||||
| class SeedDMS_View_Dashboard extends SeedDMS_Theme_Style { | ||||
| 
 | ||||
| 	protected function printList($documents, $previewer) { /* {{{ */ | ||||
| 			$txt = $this->callHook('folderListPreContent', null, [], $documents); | ||||
| 			if(is_string($txt)) | ||||
| 				echo $txt; | ||||
| 			$i = 0; | ||||
| 			$txt = $this->callHook('folderListHeader', null, '', ''); | ||||
| 			if(is_string($txt)) { | ||||
| 				echo $txt; | ||||
| 			} elseif(is_array($txt)) { | ||||
| 				print "<table id=\"viewfolder-table\" class=\"table table-condensed table-sm table-hover\">"; | ||||
| 				print "<thead>\n<tr>\n"; | ||||
| 				foreach($txt as $headcol) | ||||
| 					echo "<th>".$headcol."</th>\n"; | ||||
| 				print "</tr>\n</thead>\n"; | ||||
| 			} else { | ||||
| 				echo $this->folderListHeader(); | ||||
| 			} | ||||
| 			print "<tbody>\n"; | ||||
| 
 | ||||
| 			foreach($documents as $document) { | ||||
| 				$document->verifyLastestContentExpriry(); | ||||
| 				$txt = $this->callHook('documentListItem', $document, $previewer, false, 'dashboard'); | ||||
| 				if(is_string($txt)) | ||||
| 					echo $txt; | ||||
| 				else { | ||||
| 					echo $this->documentListRow($document, $previewer); | ||||
| 				} | ||||
| 			} | ||||
| 
 | ||||
| 			$txt = $this->callHook('folderListFooter', null); | ||||
| 			if(is_string($txt)) | ||||
| 				echo $txt; | ||||
| 			else | ||||
| 				echo "</tbody>\n</table>\n"; | ||||
| 	} /* }}} */ | ||||
| 
 | ||||
| 	public function newdocuments() { /* {{{ */ | ||||
| 		$dms = $this->params['dms']; | ||||
| 		$user = $this->params['user']; | ||||
| 		$cachedir = $this->params['cachedir']; | ||||
| 		$conversionmgr = $this->params['conversionmgr']; | ||||
| 		$previewwidth = $this->params['previewWidthList']; | ||||
| 		$previewconverters = $this->params['previewConverters']; | ||||
| 		$timeout = $this->params['timeout']; | ||||
| 		$xsendfile = $this->params['xsendfile']; | ||||
| 
 | ||||
| 		$previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout, $xsendfile); | ||||
| 		if($conversionmgr) | ||||
| 			$previewer->setConversionMgr($conversionmgr); | ||||
| 		else | ||||
| 			$previewer->setConverters($previewconverters); | ||||
| 
 | ||||
| 		echo $this->contentHeading(getMLText('new_documents')); | ||||
| 		$documents = $dms->getLatestChanges('newdocuments', mktime(0, 0, 0)-7*86400, time()); | ||||
| 		if (count($documents) > 0) { | ||||
| 			$this->printList($documents, $previewer); | ||||
| 		} | ||||
| 	} /* }}} */ | ||||
| 
 | ||||
| 	public function updateddocuments() { /* {{{ */ | ||||
| 		$dms = $this->params['dms']; | ||||
| 		$user = $this->params['user']; | ||||
| 		$cachedir = $this->params['cachedir']; | ||||
| 		$conversionmgr = $this->params['conversionmgr']; | ||||
| 		$previewwidth = $this->params['previewWidthList']; | ||||
| 		$previewconverters = $this->params['previewConverters']; | ||||
| 		$timeout = $this->params['timeout']; | ||||
| 		$xsendfile = $this->params['xsendfile']; | ||||
| 
 | ||||
| 		$previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout, $xsendfile); | ||||
| 		if($conversionmgr) | ||||
| 			$previewer->setConversionMgr($conversionmgr); | ||||
| 		else | ||||
| 			$previewer->setConverters($previewconverters); | ||||
| 
 | ||||
| 		echo $this->contentHeading(getMLText('updated_documents')); | ||||
| 		$documents = $dms->getLatestChanges('updateddocuments', mktime(0, 0, 0)-7*86400, time()); | ||||
| 		if (count($documents) > 0) { | ||||
| 			$this->printList($documents, $previewer); | ||||
| 		} | ||||
| 	} /* }}} */ | ||||
| 
 | ||||
| 	public function status() { /* {{{ */ | ||||
| 		$dms = $this->params['dms']; | ||||
| 		$user = $this->params['user']; | ||||
| 		$cachedir = $this->params['cachedir']; | ||||
| 		$conversionmgr = $this->params['conversionmgr']; | ||||
| 		$previewwidth = $this->params['previewWidthList']; | ||||
| 		$previewconverters = $this->params['previewConverters']; | ||||
| 		$timeout = $this->params['timeout']; | ||||
| 		$xsendfile = $this->params['xsendfile']; | ||||
| 
 | ||||
| 		$previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout, $xsendfile); | ||||
| 		if($conversionmgr) | ||||
| 			$previewer->setConversionMgr($conversionmgr); | ||||
| 		else | ||||
| 			$previewer->setConverters($previewconverters); | ||||
| 
 | ||||
| 		echo $this->contentHeading(getMLText('status_change')); | ||||
| 		$documents = $dms->getLatestChanges('status', mktime(0, 0, 0)-7*86400, time()); | ||||
| 		if (count($documents) > 0) { | ||||
| 			$this->printList($documents, $previewer); | ||||
| 		} | ||||
| 	} /* }}} */ | ||||
| 
 | ||||
| 	function js() { /* {{{ */ | ||||
| 		$dms = $this->params['dms']; | ||||
| 		$user = $this->params['user']; | ||||
| 
 | ||||
| 		header('Content-Type: application/javascript; charset=UTF-8'); | ||||
| 		parent::jsTranslations(array('cancel', 'splash_move_document', 'confirm_move_document', 'move_document', 'confirm_transfer_link_document', 'transfer_content', 'link_document', 'splash_move_folder', 'confirm_move_folder', 'move_folder')); | ||||
| 		$this->printDeleteDocumentButtonJs(); | ||||
| 		/* Add js for catching click on document in one page mode */ | ||||
| 		$this->printClickDocumentJs(); | ||||
| 	} /* }}} */ | ||||
| 
 | ||||
| 	function show() { /* {{{ */ | ||||
| 		$dms = $this->params['dms']; | ||||
| 		$user = $this->params['user']; | ||||
| 		$cachedir = $this->params['cachedir']; | ||||
| 		$conversionmgr = $this->params['conversionmgr']; | ||||
| 		$previewwidth = $this->params['previewWidthList']; | ||||
| 		$previewconverters = $this->params['previewConverters']; | ||||
| 		$timeout = $this->params['timeout']; | ||||
| 		$xsendfile = $this->params['xsendfile']; | ||||
| 
 | ||||
| 		$this->htmlStartPage(getMLText("calendar")); | ||||
| 		$this->globalNavigation(); | ||||
| 		$this->contentStart(); | ||||
| 
 | ||||
| 		$this->rowStart(); | ||||
| 		$this->columnStart(4); | ||||
| ?>
 | ||||
| 		<div class="ajax" data-view="Dashboard" data-action="newdocuments"></div> | ||||
| <?php | ||||
| 		$this->columnEnd(); | ||||
| 		$this->columnStart(4); | ||||
| ?>
 | ||||
| 		<div class="ajax" data-view="Dashboard" data-action="updateddocuments"></div> | ||||
| <?php | ||||
| 		$this->columnEnd(); | ||||
| 		$this->columnStart(4); | ||||
| ?>
 | ||||
| 		<div class="ajax" data-view="Dashboard" data-action="status"></div> | ||||
| <?php | ||||
| 		$this->columnEnd(); | ||||
| 		$this->rowEnd(); | ||||
| 		$this->contentEnd(); | ||||
| 		$this->htmlEndPage(); | ||||
| 	} /* }}} */ | ||||
| 
 | ||||
| } | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Uwe Steinmann
						Uwe Steinmann