* @copyright Copyright (C) 2002-2005 Markus Westphal, * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ /** * Include parent class */ require_once("class.Bootstrap.php"); /** * Class which outputs the html page for ReceiptSummary view * * @category DMS * @package SeedDMS * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann * @copyright Copyright (C) 2002-2005 Markus Westphal, * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ class SeedDMS_View_ReceiptSummary extends SeedDMS_Bootstrap_Style { function show() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; $cachedir = $this->params['cachedir']; $previewwidth = $this->params['previewWidthList']; $previewconverters = $this->params['previewconverters']; $timeout = $this->params['timeout']; $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout); $previewer->setConverters($previewconverters); $this->htmlStartPage(getMLText("my_documents")); $this->globalNavigation(); $this->contentStart(); $this->pageNavigation(getMLText("my_documents"), "my_documents"); $this->contentHeading(getMLText("receipt_summary")); // TODO: verificare scadenza // Get document list for the current user. $receiptStatus = $user->getReceiptStatus(); // reverse order $receiptStatus["indstatus"]=array_reverse($receiptStatus["indstatus"],true); $receiptStatus["grpstatus"]=array_reverse($receiptStatus["grpstatus"],true); $printheader=true; $iRev = array(); foreach ($receiptStatus["indstatus"] as $st) { $document = $dms->getDocument($st['documentID']); if($document) $version = $document->getContentByVersion($st['version']); $moduser = $dms->getUser($st['required']); if ($document && $version) { if ($printheader){ print ""; print "\n\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n\n\n"; $printheader=false; } $txt = $this->callHook('documentListItem', $document, $previewer); if(is_string($txt)) echo $txt; else { echo "getID()."\" class=\"table-row-document\" rel=\"document_".$document->getID()."\" formtoken=\"".createFormKey('movedocument')."\" draggable=\"true\">"; echo $this->documentListRow($document, $previewer, true, $st['version']); print ""; echo ""; } } if ($st["status"]!=-2) { $iRev[] = $st["documentID"]; } } if (!$printheader) { echo "\n
".getMLText("name")."".getMLText("status")."".getMLText("action")."".getMLText("last_update")."
".$st["date"]." ". htmlspecialchars($moduser->getFullName()) ."
"; } else { printMLText("no_docs_to_receipt"); } $this->contentHeading(getMLText("group_receipt_summary")); $printheader=true; foreach ($receiptStatus["grpstatus"] as $st) { $document = $dms->getDocument($st['documentID']); if($document) $version = $document->getContentByVersion($st['version']); $modgroup = $dms->getGroup($st['required']); if (!in_array($st["documentID"], $iRev) && $document && $version) { if ($printheader){ print ""; print "\n\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n\n\n"; $printheader=false; } $txt = $this->callHook('documentListItem', $document, $previewer); if(is_string($txt)) echo $txt; else { echo "getID()."\" class=\"table-row-document\" rel=\"document_".$document->getID()."\" formtoken=\"".createFormKey('movedocument')."\" draggable=\"true\">"; echo $this->documentListRow($document, $previewer, true, $st['version']); print ""; echo ""; } } } if (!$printheader) { echo "\n
".getMLText("name")."".getMLText("status")."".getMLText("action")."".getMLText("last_update")."
".$st["date"]." ". htmlspecialchars($modgroup->getName()) ."
"; }else{ printMLText("no_docs_to_receipt"); } $this->contentEnd(); $this->htmlEndPage(); } /* }}} */ } ?>