mirror of
				https://git.code.sf.net/p/seeddms/code
				synced 2025-10-30 20:51:22 +00:00 
			
		
		
		
	show logs of finished worflows
This commit is contained in:
		
							parent
							
								
									172d5b3063
								
							
						
					
					
						commit
						aa9600453d
					
				|  | @ -3727,6 +3727,23 @@ $(document).ready(function() { | ||||||
| <?php | <?php | ||||||
| 	} /* }}} */ | 	} /* }}} */ | ||||||
| 
 | 
 | ||||||
|  | 	protected function printWorkflowLog($wkflogs) { /* {{{ */ | ||||||
|  | 		echo "<table class=\"table table-condensed table-sm\"><thead>"; | ||||||
|  | 		echo "<th>".getMLText('workflow')."</th><th>".getMLText('date')."</th><th>".getMLText('action')."</th><th>".getMLText('user')."</th><th>".getMLText('comment')."</th></tr>\n"; | ||||||
|  | 		echo "</thead><tbody>"; | ||||||
|  | 		foreach($wkflogs as $wkflog) { | ||||||
|  | 			echo "<tr>"; | ||||||
|  | 			echo "<td>".htmlspecialchars($wkflog->getWorkflow()->getName())."</td>"; | ||||||
|  | 			echo "<td>".getLongReadableDate($wkflog->getDate())."</td>"; | ||||||
|  | 		echo "<td>".htmlspecialchars(getMLText('action_'.strtolower($wkflog->getTransition()->getAction()->getName()), array(), $wkflog->getTransition()->getAction()->getName()))."</td>"; | ||||||
|  | 			$loguser = $wkflog->getUser(); | ||||||
|  | 			echo "<td>".htmlspecialchars($loguser->getFullName())."</td>"; | ||||||
|  | 			echo "<td>".htmlspecialchars($wkflog->getComment())."</td>"; | ||||||
|  | 			echo "</tr>"; | ||||||
|  | 		} | ||||||
|  | 		print "</tbody>\n</table>\n"; | ||||||
|  | 	} /* }}} */ | ||||||
|  | 
 | ||||||
| 	/** | 	/** | ||||||
| 	 * Show progressbar | 	 * Show progressbar | ||||||
| 	 * | 	 * | ||||||
|  |  | ||||||
|  | @ -554,7 +554,7 @@ class SeedDMS_View_DocumentVersionDetail extends SeedDMS_Theme_Style { | ||||||
| 			$this->contentContainerEnd(); | 			$this->contentContainerEnd(); | ||||||
| 		} /* }}} */ | 		} /* }}} */ | ||||||
| 
 | 
 | ||||||
| 		if($user->isAdmin()) { | 		if($accessop->check_view_access($this, array('action'=>'statuslog'))) { | ||||||
| 			$this->contentHeading(getMLText("status")); | 			$this->contentHeading(getMLText("status")); | ||||||
| 			$this->contentContainerStart(); | 			$this->contentContainerStart(); | ||||||
| 			$statuslog = $version->getStatusLog(); | 			$statuslog = $version->getStatusLog(); | ||||||
|  | @ -570,26 +570,19 @@ class SeedDMS_View_DocumentVersionDetail extends SeedDMS_Theme_Style { | ||||||
| 			} | 			} | ||||||
| 			print "</tbody>\n</table>\n"; | 			print "</tbody>\n</table>\n"; | ||||||
| 			$this->contentContainerEnd(); | 			$this->contentContainerEnd(); | ||||||
|  | 		} | ||||||
| 
 | 
 | ||||||
| 			$wkflogs = $version->getWorkflowLog(); | 		if($accessop->check_view_access($this, array('action'=>'finished_workflowlog'))) { | ||||||
| 			if($wkflogs) { | 			$wkfalllogs = $version->getWorkflowLog(); | ||||||
| 				$this->contentHeading(getMLText("workflow_summary")); | 			if($wkfalllogs) { | ||||||
| 				$this->contentContainerStart(); | 				$this->contentHeading(getMLText("finished_workflow_log")); | ||||||
| 				echo "<table class=\"table table-condensed\"><thead>"; | 				foreach($wkfalllogs as $wkflogs) { | ||||||
| 				echo "<th>".getMLText('date')."</th><th>".getMLText('action')."</th><th>".getMLText('user')."</th><th>".getMLText('comment')."</th></tr>\n"; | 					$this->printWorkflowLog($wkflogs); | ||||||
| 				echo "</thead><tbody>"; |  | ||||||
| 				foreach($wkflogs as $wkflog) { |  | ||||||
| 					echo "<tr>"; |  | ||||||
| 					echo "<td>".$wkflog->getDate()."</td>"; |  | ||||||
| 					echo "<td>".$wkflog->getTransition()->getAction()->getName()."</td>"; |  | ||||||
| 					$loguser = $wkflog->getUser(); |  | ||||||
| 					echo "<td>".$loguser->getFullName()."</td>"; |  | ||||||
| 					echo "<td>".$wkflog->getComment()."</td>"; |  | ||||||
| 					echo "</tr>"; |  | ||||||
| 				} | 				} | ||||||
| 				print "</tbody>\n</table>\n"; |  | ||||||
| 				$this->contentContainerEnd(); |  | ||||||
| 			} | 			} | ||||||
|  | 		} | ||||||
|  | 
 | ||||||
|  | 		if($user->isAdmin() || $user->getId() == $document->getOwner()->getId()) { | ||||||
| 			$this->rowStart(); | 			$this->rowStart(); | ||||||
| 			/* Check for an existing review log, even if the workflowmode | 			/* Check for an existing review log, even if the workflowmode | ||||||
| 			 * is set to traditional_only_approval. There may be old documents | 			 * is set to traditional_only_approval. There may be old documents | ||||||
|  |  | ||||||
|  | @ -1039,6 +1039,22 @@ $(document).ready( function() { | ||||||
| 			print "</tbody>\n</table>\n"; | 			print "</tbody>\n</table>\n"; | ||||||
| 			$this->contentContainerEnd(); | 			$this->contentContainerEnd(); | ||||||
| 		} | 		} | ||||||
|  | 
 | ||||||
|  | 		if(!$workflow) { | ||||||
|  | 			if($accessobject->check_view_access($this, array('action'=>'finished_workflowlog'))) { | ||||||
|  | 				$wkfalllogs = $latestContent->getWorkflowLog(); | ||||||
|  | 				if($wkfalllogs) { | ||||||
|  | 					$this->contentHeading(getMLText("finished_workflow_log")); | ||||||
|  | 					foreach($wkfalllogs as $wkflogs) { | ||||||
|  | 						$this->rowStart(); | ||||||
|  | 						$this->columnStart(12); | ||||||
|  | 						$this->printWorkflowLog($wkflogs); | ||||||
|  | 						$this->columnEnd(); | ||||||
|  | 						$this->rowEnd(); | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
| ?>
 | ?>
 | ||||||
| 		</div> | 		</div> | ||||||
| <?php | <?php | ||||||
|  | @ -1508,21 +1524,7 @@ $(document).ready( function() { | ||||||
| 				$this->rowStart(); | 				$this->rowStart(); | ||||||
| 				$this->columnStart(12); | 				$this->columnStart(12); | ||||||
| 				$this->contentHeading(getMLText("workflow_log")); | 				$this->contentHeading(getMLText("workflow_log")); | ||||||
| 				$this->contentContainerStart(); | 				$this->printWorkflowLog($wkflogs); | ||||||
| 				echo "<table class=\"table table-condensed table-sm\"><thead>"; |  | ||||||
| 				echo "<th>".getMLText('date')."</th><th>".getMLText('action')."</th><th>".getMLText('user')."</th><th>".getMLText('comment')."</th></tr>\n"; |  | ||||||
| 				echo "</thead><tbody>"; |  | ||||||
| 				foreach($wkflogs as $wkflog) { |  | ||||||
| 					echo "<tr>"; |  | ||||||
| 					echo "<td>".getLongReadableDate($wkflog->getDate())."</td>"; |  | ||||||
| 				echo "<td>".htmlspecialchars(getMLText('action_'.strtolower($wkflog->getTransition()->getAction()->getName()), array(), $wkflog->getTransition()->getAction()->getName()))."</td>"; |  | ||||||
| 					$loguser = $wkflog->getUser(); |  | ||||||
| 					echo "<td>".htmlspecialchars($loguser->getFullName())."</td>"; |  | ||||||
| 					echo "<td>".htmlspecialchars($wkflog->getComment())."</td>"; |  | ||||||
| 					echo "</tr>"; |  | ||||||
| 				} |  | ||||||
| 				print "</tbody>\n</table>\n"; |  | ||||||
| 				$this->contentContainerEnd(); |  | ||||||
| 				$this->columnEnd(); | 				$this->columnEnd(); | ||||||
| 				$this->rowEnd(); | 				$this->rowEnd(); | ||||||
| 			} | 			} | ||||||
|  |  | ||||||
|  | @ -3809,6 +3809,23 @@ $(document).ready(function() { | ||||||
| <?php | <?php | ||||||
| 	} /* }}} */ | 	} /* }}} */ | ||||||
| 
 | 
 | ||||||
|  | 	protected function printWorkflowLog($wkflogs) { /* {{{ */ | ||||||
|  | 		echo "<table class=\"table table-condensed table-sm\"><thead>"; | ||||||
|  | 		echo "<th>".getMLText('workflow')."</th><th>".getMLText('date')."</th><th>".getMLText('action')."</th><th>".getMLText('user')."</th><th>".getMLText('comment')."</th></tr>\n"; | ||||||
|  | 		echo "</thead><tbody>"; | ||||||
|  | 		foreach($wkflogs as $wkflog) { | ||||||
|  | 			echo "<tr>"; | ||||||
|  | 			echo "<td>".htmlspecialchars($wkflog->getWorkflow()->getName())."</td>"; | ||||||
|  | 			echo "<td>".getLongReadableDate($wkflog->getDate())."</td>"; | ||||||
|  | 		echo "<td>".htmlspecialchars(getMLText('action_'.strtolower($wkflog->getTransition()->getAction()->getName()), array(), $wkflog->getTransition()->getAction()->getName()))."</td>"; | ||||||
|  | 			$loguser = $wkflog->getUser(); | ||||||
|  | 			echo "<td>".htmlspecialchars($loguser->getFullName())."</td>"; | ||||||
|  | 			echo "<td>".htmlspecialchars($wkflog->getComment())."</td>"; | ||||||
|  | 			echo "</tr>"; | ||||||
|  | 		} | ||||||
|  | 		print "</tbody>\n</table>\n"; | ||||||
|  | 	} /* }}} */ | ||||||
|  | 
 | ||||||
| 	/** | 	/** | ||||||
| 	 * Show progressbar | 	 * Show progressbar | ||||||
| 	 * | 	 * | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Uwe Steinmann
						Uwe Steinmann