* @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"); /** * Include class to preview documents */ require_once("SeedDMS/Preview.php"); /** * Class which outputs the html page for ViewDocument 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_ViewDocument extends SeedDMS_Bootstrap_Style { protected function getAccessModeText($defMode) { /* {{{ */ switch($defMode) { case M_NONE: return getMLText("access_mode_none"); break; case M_READ: return getMLText("access_mode_read"); break; case M_READWRITE: return getMLText("access_mode_readwrite"); break; case M_ALL: return getMLText("access_mode_all"); break; } } /* }}} */ protected function printAccessList($obj) { /* {{{ */ $accessList = $obj->getAccessList(); if (count($accessList["users"]) == 0 && count($accessList["groups"]) == 0) return; $content = ''; for ($i = 0; $i < count($accessList["groups"]); $i++) { $group = $accessList["groups"][$i]->getGroup(); $accesstext = $this->getAccessModeText($accessList["groups"][$i]->getMode()); $content .= $accesstext.": ".htmlspecialchars($group->getName()); if ($i+1 < count($accessList["groups"]) || count($accessList["users"]) > 0) $content .= "
"; } for ($i = 0; $i < count($accessList["users"]); $i++) { $user = $accessList["users"][$i]->getUser(); $accesstext = $this->getAccessModeText($accessList["users"][$i]->getMode()); $content .= $accesstext.": ".htmlspecialchars($user->getFullName()); if ($i+1 < count($accessList["users"])) $content .= "
"; } if(count($accessList["groups"]) + count($accessList["users"]) > 3) { $this->printPopupBox(getMLText('list_access_rights'), $content); } else { echo $content; } } /* }}} */ /** * Output a single attribute in the document info section * * @param object $attribute attribute */ protected function printAttribute($attribute) { /* {{{ */ $attrdef = $attribute->getAttributeDefinition(); ?> getName()); ?>: getType()) { case SeedDMS_Core_AttributeDefinition::type_url: $attrs = $attribute->getValueAsArray(); $tmp = array(); foreach($attrs as $attr) { $tmp[] = ''.htmlspecialchars($attr).''; } echo implode('
', $tmp); break; case SeedDMS_Core_AttributeDefinition::type_email: $attrs = $attribute->getValueAsArray(); $tmp = array(); foreach($attrs as $attr) { $tmp[] = ''.htmlspecialchars($attr).''; } echo implode('
', $tmp); break; default: echo htmlspecialchars(implode(', ', $attribute->getValueAsArray())); } ?> params['dms']; $user = $this->params['user']; $previewwidth = $this->params['previewWidthList']; $cachedir = $this->params['cachedir']; $document = $this->params['document']; if($document) { if ($document->getAccessMode($user) >= M_READ) { $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth); $txt = $this->callHook('documentListItem', $document, $previewer, false, ''); if(is_string($txt)) $content = $txt; else $content = $this->documentListRow($document, $previewer, true); echo $content; } } } /* }}} */ function timelinedata() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; $document = $this->params['document']; $jsondata = array(); if($user->isAdmin()) { $data = $document->getTimeline(); foreach($data as $i=>$item) { switch($item['type']) { case 'add_version': $msg = getMLText('timeline_'.$item['type'], array('document'=>htmlspecialchars($item['document']->getName()), 'version'=> $item['version'])); break; case 'add_file': $msg = getMLText('timeline_'.$item['type'], array('document'=>htmlspecialchars($item['document']->getName()))); break; case 'status_change': $msg = getMLText('timeline_'.$item['type'], array('document'=>htmlspecialchars($item['document']->getName()), 'version'=> $item['version'], 'status'=> getOverallStatusText($item['status']))); break; default: $msg = '???'; } $data[$i]['msg'] = $msg; } foreach($data as $item) { if($item['type'] == 'status_change') $classname = $item['type']."_".$item['status']; else $classname = $item['type']; $d = makeTsFromLongDate($item['date']); $jsondata[] = array('start'=>date('c', $d)/*$item['date']*/, 'content'=>$item['msg'], 'className'=>$classname); } } header('Content-Type: application/json'); echo json_encode($jsondata); } /* }}} */ function js() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; $document = $this->params['document']; header('Content-Type: application/javascript'); if($user->isAdmin()) { $this->printTimelineJs('out.ViewDocument.php?action=timelinedata&documentid='.$document->getID(), 300, '', date('Y-m-d')); } $this->printDocumentChooserJs("form1"); } /* }}} */ function documentInfos() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; $document = $this->params['document']; $this->contentHeading(getMLText("document_infos")); $this->contentContainerStart(); $txt = $this->callHook('preDocumentInfos', $document); if(is_string($txt)) echo $txt; $txt = $this->callHook('documentInfos', $document); if(is_string($txt)) echo $txt; else { ?> isAdmin()) { echo ""; echo "\n"; echo "\n"; echo ""; } ?> getComment()) { ?> isAdmin()) { echo ""; echo ""; echo ""; echo ""; if($document->inheritsAccess()) { echo ""; echo "\n"; echo ""; } else { echo ""; echo ""; echo ""; echo ""; } } ?> expires()) { ?> getKeywords()) { ?> getCategories()) { ?> getAttributes(); if($attributes) { foreach($attributes as $attribute) { $arr = $this->callHook('showDocumentAttribute', $document, $attribute); if(is_array($arr)) { echo ""; echo ""; echo ""; echo ""; } else { $this->printAttribute($attribute); } } } ?>
".getMLText("id").":".htmlspecialchars($document->getID())."
: getName());?>
: getOwner(); print "getEmail()."\">".htmlspecialchars($owner->getFullName()).""; ?>
: getComment());?>
".getMLText('default_access').":".$this->getAccessModeText($document->getDefaultAccess())."
".getMLText("access_mode").":"; echo getMLText("inherited")."
"; $this->printAccessList($document); echo "
".getMLText('access_mode').":"; $this->printAccessList($document); echo "
: getUsedDiskSpace());?>
: getDate()); ?>
: getExpires()); ?>
: getKeywords());?>
: getName()); echo implode(', ', $ct); ?>
".$arr[0].":".$arr[1]."
callHook('postDocumentInfos', $document); if(is_string($txt)) echo $txt; $this->contentContainerEnd(); } /* }}} */ function preview() { /* {{{ */ $dms = $this->params['dms']; $document = $this->params['document']; $timeout = $this->params['timeout']; $showfullpreview = $this->params['showFullPreview']; $converttopdf = $this->params['convertToPdf']; $cachedir = $this->params['cachedir']; if(!$showfullpreview) return; $latestContent = $document->getLatestContent(); $txt = $this->callHook('preDocumentPreview', $latestContent); if(is_string($txt)) echo $txt; $txt = $this->callHook('documentPreview', $latestContent); if(is_string($txt)) echo $txt; else { switch($latestContent->getMimeType()) { case 'audio/mpeg': case 'audio/mp3': case 'audio/ogg': case 'audio/wav': $this->contentHeading(getMLText("preview")); ?> contentHeading(getMLText("preview")); ?> contentHeading(getMLText("preview")); ?> callHook('additionalDocumentPreview', $latestContent); if(is_string($txt)) echo $txt; break; } } $txt = $this->callHook('postDocumentPreview', $latestContent); if(is_string($txt)) echo $txt; if($converttopdf) { $pdfpreviewer = new SeedDMS_Preview_PdfPreviewer($cachedir, $timeout); if($pdfpreviewer->hasConverter($latestContent->getMimeType())) { $this->contentHeading(getMLText("preview")); ?> params['dms']; $user = $this->params['user']; $folder = $this->params['folder']; $document = $this->params['document']; $accessop = $this->params['accessobject']; $viewonlinefiletypes = $this->params['viewonlinefiletypes']; $enableownerrevapp = $this->params['enableownerrevapp']; $workflowmode = $this->params['workflowmode']; $cachedir = $this->params['cachedir']; $previewwidthlist = $this->params['previewWidthList']; $previewwidthdetail = $this->params['previewWidthDetail']; $documentid = $document->getId(); $currenttab = $this->params['currenttab']; $timeout = $this->params['timeout']; $versions = $document->getContent(); $this->htmlAddHeader(''."\n", 'css'); $this->htmlAddHeader(''."\n", 'js'); $this->htmlAddHeader(''."\n", 'js'); $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); $this->globalNavigation($folder); $this->contentStart(); $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document); if ($document->isLocked()) { $lockingUser = $document->getLockingUser(); $txt = $this->callHook('documentIsLocked', $document, $lockingUser); if(is_string($txt)) echo $txt; else { ?>
$lockingUser->getEmail(), "username" => htmlspecialchars($lockingUser->getFullName())));?>
getLatestContent(); $files = $document->getDocumentFiles($latestContent->getVersion()); $files = SeedDMS_Core_DMS::filterDocumentFiles($user, $files); /* Retrieve linked documents */ $links = $document->getDocumentLinks(); $links = SeedDMS_Core_DMS::filterDocumentLinks($user, $links, 'target'); /* Retrieve reverse linked documents */ $reverselinks = $document->getReverseDocumentLinks(); $reverselinks = SeedDMS_Core_DMS::filterDocumentLinks($user, $reverselinks, 'source'); /* Retrieve latest content */ $latestContent = $document->getLatestContent(); $needwkflaction = false; if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') { } else { $workflow = $latestContent->getWorkflow(); if($workflow) { $workflowstate = $latestContent->getWorkflowState(); $transitions = $workflow->getNextTransitions($workflowstate); $needwkflaction = $latestContent->needsWorkflowAction($user); } } if($needwkflaction) { $this->infoMsg(getMLText('needs_workflow_action')); } $status = $latestContent->getStatus(); $reviewStatus = $latestContent->getReviewStatus(); $approvalStatus = $latestContent->getApprovalStatus(); ?>
documentInfos(); $this->preview(); ?>
contentContainerStart(); print getMLText('document_content_missing'); $this->contentContainerEnd(); $this->contentEnd(); $this->htmlEndPage(); exit; } // verify if file exists $file_exists=file_exists($dms->contentDir . $latestContent->getPath()); $this->contentContainerStart(); print ""; print "\n\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print ""; print ""; print ""; print "\n
".getMLText("file")."".getMLText("comment")."".getMLText("status")."
"; /* print ""; */ $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidthdetail, $timeout); $previewer->createPreview($latestContent); if ($file_exists) { if ($viewonlinefiletypes && in_array(strtolower($latestContent->getFileType()), $viewonlinefiletypes)) { print "getVersion()."\">"; } else { print "getVersion()."\">"; } } if($previewer->hasPreview($latestContent)) { print("getID()."&version=".$latestContent->getVersion()."&width=".$previewwidthdetail."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"); } else { print "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; } if ($file_exists) { print ""; } print "
    \n"; print "
  • ".$latestContent->getOriginalFileName() ."
  • \n"; print "
  • ".getMLText('version').": ".$latestContent->getVersion()."
  • \n"; if ($file_exists) print "
  • ". SeedDMS_Core_File::format_filesize($latestContent->getFileSize()) .", ".htmlspecialchars($latestContent->getMimeType())."
  • "; else print "
  • ".getMLText("document_deleted")."
  • "; $updatingUser = $latestContent->getUser(); print "
  • ".getMLText("uploaded_by")." getEmail()."\">".htmlspecialchars($updatingUser->getFullName())."
  • "; print "
  • ".getLongReadableDate($latestContent->getDate())."
  • "; print "
\n"; print "
    \n"; $attributes = $latestContent->getAttributes(); if($attributes) { foreach($attributes as $attribute) { $arr = $this->callHook('showDocumentContentAttribute', $latestContent, $attribute); if(is_array($arr)) { print "
  • ".$arr[0].": ".$arr[1]."
  • \n"; } else { $attrdef = $attribute->getAttributeDefinition(); print "
  • ".htmlspecialchars($attrdef->getName()).": ".htmlspecialchars(implode(', ', $attribute->getValueAsArray()))."
  • \n"; } } } print "
".htmlspecialchars($latestContent->getComment()).""; print getOverallStatusText($status["status"]); if ( $status["status"]==S_DRAFT_REV || $status["status"]==S_DRAFT_APP || $status["status"]==S_IN_WORKFLOW || $status["status"]==S_EXPIRED ){ print "
hasExpired()?" class=\"warning\" ":"").">".(!$document->getExpires() ? getMLText("does_not_expire") : getMLText("expires").": ".getReadableDate($document->getExpires())).""; } print "
"; print ""; print ""; echo "
\n"; $this->contentContainerEnd(); if($user->isAdmin()) { $this->contentHeading(getMLText("status")); $this->contentContainerStart(); $statuslog = $latestContent->getStatusLog(); echo ""; echo "\n"; echo ""; foreach($statuslog as $entry) { if($suser = $dms->getUser($entry['userID'])) $fullname = $suser->getFullName(); else $fullname = "--"; echo "\n"; } print "\n
".getMLText('date')."".getMLText('status')."".getMLText('user')."".getMLText('comment')."
".$entry['date']."".getOverallStatusText($entry['status'])."".$fullname."".$entry['comment']."
\n"; $this->contentContainerEnd(); $wkflogs = $latestContent->getWorkflowLog(); if($wkflogs) { $this->contentHeading(getMLText("workflow_summary")); $this->contentContainerStart(); echo ""; echo "\n"; echo ""; foreach($wkflogs as $wkflog) { echo ""; echo ""; echo ""; $loguser = $wkflog->getUser(); echo ""; echo ""; echo ""; } print "\n
".getMLText('date')."".getMLText('action')."".getMLText('user')."".getMLText('comment')."
".$wkflog->getDate()."".$wkflog->getTransition()->getAction()->getName()."".$loguser->getFullName()."".$wkflog->getComment()."
\n"; $this->contentContainerEnd(); } } ?>
0) || (is_array($approvalStatus) && count($approvalStatus)>0)) { ?>
contentContainerstart(); print "\n"; /* Just check fo an exting reviewStatus, even workflow mode is set * to traditional_only_approval. There may be old documents which * are still in S_DRAFT_REV. */ if (/*$workflowmode != 'traditional_only_approval' &&*/ is_array($reviewStatus) && count($reviewStatus)>0) { print ""; print "\n"; print "\n"; print "\n"; print ""; print "\n"; print "\n"; print "\n"; foreach ($reviewStatus as $r) { $required = null; $is_reviewer = false; switch ($r["type"]) { case 0: // Reviewer is an individual. $required = $dms->getUser($r["required"]); if (!is_object($required)) { $reqName = getMLText("unknown_user")." '".$r["required"]."'"; } else { $reqName = htmlspecialchars($required->getFullName()." (".$required->getLogin().")"); if($required->getId() == $user->getId()/* && ($user->getId() != $owner->getId() || $enableownerrevapp == 1)*/) $is_reviewer = true; } break; case 1: // Reviewer is a group. $required = $dms->getGroup($r["required"]); if (!is_object($required)) { $reqName = getMLText("unknown_group")." '".$r["required"]."'"; } else { $reqName = "".htmlspecialchars($required->getName()).""; if($required->isMember($user)/* && ($user->getId() != $owner->getId() || $enableownerrevapp == 1)*/) $is_reviewer = true; } break; } print "\n"; print "\n"; print ""; print "\n"; print "\n"; print "\n"; print "\n"; } } if (is_array($approvalStatus) && count($approvalStatus)>0) { print ""; print "\n"; print "\n"; print "\n"; print ""; print "\n"; print "\n"; print "\n"; foreach ($approvalStatus as $a) { $required = null; $is_approver = false; switch ($a["type"]) { case 0: // Approver is an individual. $required = $dms->getUser($a["required"]); if (!is_object($required)) { $reqName = getMLText("unknown_user")." '".$a["required"]."'"; } else { $reqName = htmlspecialchars($required->getFullName()." (".$required->getLogin().")"); if($required->getId() == $user->getId()) $is_approver = true; } break; case 1: // Approver is a group. $required = $dms->getGroup($a["required"]); if (!is_object($required)) { $reqName = getMLText("unknown_group")." '".$a["required"]."'"; } else { $reqName = "".htmlspecialchars($required->getName()).""; if($required->isMember($user)/* && ($user->getId() != $owner->getId() || $enableownerrevapp == 1)*/) $is_approver = true; } break; } print "\n"; print "\n"; print ""; print "\n"; print "\n"; print "\n\n"; } } print "
\n"; $this->contentSubHeading(getMLText("reviewers")); print "
".getMLText("name")."".getMLText("last_update")."".getMLText("comment")."".getMLText("status")."
".$reqName."
  • ".$r["date"]."
  • "; /* $updateUser is the user who has done the review */ $updateUser = $dms->getUser($r["userID"]); print "
  • ".(is_object($updateUser) ? htmlspecialchars($updateUser->getFullName()." (".$updateUser->getLogin().")") : "unknown user id '".$r["userID"]."'")."
".htmlspecialchars($r["comment"]); if($r['file']) { echo "
"; echo " ".getMLText('download').""; } print "
".getReviewStatusText($r["status"])."
\n"; $this->contentSubHeading(getMLText("approvers")); print "
".getMLText("name")."".getMLText("last_update")."".getMLText("comment")."".getMLText("status")."
".$reqName."
  • ".$a["date"]."
  • "; /* $updateUser is the user who has done the approval */ $updateUser = $dms->getUser($a["userID"]); print "
  • ".(is_object($updateUser) ? htmlspecialchars($updateUser->getFullName()." (".$updateUser->getLogin().")") : "unknown user id '".$a["userID"]."'")."
".htmlspecialchars($a["comment"]); if($a['file']) { echo "
"; echo " ".getMLText('download').""; } echo "
".getApprovalStatusText($a["status"]).""; print "
\n"; $this->contentContainerEnd(); if($user->isAdmin()) { ?>
getReviewStatus(10) /*$workflowmode != 'traditional_only_approval'*/) { ?>
printProtocol($latestContent, 'review'); ?>
printProtocol($latestContent, 'approval'); ?>
triggerWorkflowTransitionIsAllowed($user, $transition)) { $user_is_involved = true; } } ?>
"; if($user_is_involved || $user->isAdmin()) echo "
"; else echo "
"; $this->contentContainerStart(); if($user->isAdmin()) { if(SeedDMS_Core_DMS::checkIfEqual($workflow->getInitState(), $latestContent->getWorkflowState())) { print "
".createHiddenFieldWithKey('removeworkflowfromdocument')."getVersion()."\" />
"; } else { print "
".createHiddenFieldWithKey('rewindworkflow')."getVersion()."\" />
"; } } echo "

".$workflow->getName()."

"; if($parentworkflow = $latestContent->getParentWorkflow()) { echo "

Sub workflow of '".$parentworkflow->getName()."'

"; } echo "
".getMLText('current_state').": ".$workflowstate->getName()."
"; echo "\n"; echo ""; echo ""; foreach($transitions as $transition) { $nextstate = $transition->getNextState(); $docstatus = $nextstate->getDocumentStatus(); echo ""; } echo ""; echo ""; echo ""; foreach($transitions as $transition) { $action = $transition->getAction(); echo ""; } echo ""; echo ""; echo ""; foreach($transitions as $transition) { $transusers = $transition->getUsers(); echo ""; } echo ""; echo ""; echo ""; foreach($transitions as $transition) { $transgroups = $transition->getGroups(); echo ""; } echo ""; echo ""; echo ""; foreach($transitions as $transition) { echo ""; } echo ""; echo ""; echo ""; $allowedtransitions = array(); foreach($transitions as $transition) { echo ""; } echo ""; echo "
".getMLText('next_state').": ".$nextstate->getName()."
".getMLText('action').":".getMLText('action_'.strtolower($action->getName()), array(), $action->getName())."
".getMLText('users').":"; foreach($transusers as $transuser) { $u = $transuser->getUser(); echo $u->getFullName(); if($document->getAccessMode($u) < M_READ) { echo " (no access)"; } echo "
"; } echo "
".getMLText('groups').":"; foreach($transgroups as $transgroup) { $g = $transgroup->getGroup(); echo getMLText('at_least_n_users_of_group', array("number_of_users" => $transgroup->getNumOfUsers(), "group" => $g->getName())); if ($document->getGroupAccessMode($g) < M_READ) { echo " (no access)"; } echo "
"; } echo "
".getMLText('users_done_work').":"; if($latestContent->executeWorkflowTransitionIsAllowed($transition)) { /* If this is reached, then the transition should have been executed * but for some reason the next state hasn't been reached. This can * be causes, if a transition which was previously already executed * is about to be executed again. E.g. there was already a transition * T1 from state S1 to S2 triggered by user U1. * Then there was a second transition T2 from * S2 back to S1. If the state S1 has been reached again, then * executeWorkflowTransitionIsAllowed() will think that T1 could be * executed because there is already a log entry saying, that U1 * has triggered the workflow. */ echo "Done "; } $wkflogs = $latestContent->getWorkflowLog($transition); foreach($wkflogs as $wkflog) { $loguser = $wkflog->getUser(); echo $loguser->getFullName()." ("; $names = array(); foreach($loguser->getGroups() as $loggroup) { $names[] = $loggroup->getName(); } echo implode(", ", $names); echo ") - "; echo $wkflog->getDate(); echo "
"; } echo "
"; if($latestContent->triggerWorkflowTransitionIsAllowed($user, $transition)) { $action = $transition->getAction(); print "
".createHiddenFieldWithKey('triggerworkflow')."getVersion()."\" />getID()."\" />getName()), array(), $action->getName())."\" />
"; $allowedtransitions[] = $transition; } echo "
"; $workflows = $dms->getAllWorkflows(); if($workflows) { $subworkflows = array(); foreach($workflows as $wkf) { if($wkf->getInitState()->getID() == $workflowstate->getID()) { if($workflow->getID() != $wkf->getID()) { $subworkflows[] = $wkf; } } } if($subworkflows) { echo "
".createHiddenFieldWithKey('runsubworkflow')."getVersion()."\" />"; echo ""; echo "
"; if($user_is_involved || $user->isAdmin()) { echo "
"; ?> "; } echo "
"; ?>
1) { ?>
contentContainerStart(); if (count($files) > 0) { print ""; print "\n\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n\n\n"; foreach($files as $file) { $file_exists=file_exists($dms->contentDir . $file->getPath()); $responsibleUser = $file->getUser(); print ""; print ""; print ""; print ""; print ""; print ""; } print "\n
".getMLText("file")."".getMLText("comment")."
"; $previewer->createPreview($file, $previewwidthdetail); if($file_exists) { if ($viewonlinefiletypes && in_array(strtolower($file->getFileType()), $viewonlinefiletypes)) print "getID()."\">"; else print "getID()."\">"; } if($previewer->hasPreview($file)) { print("getID()."&file=".$file->getID()."&width=".$previewwidthdetail."\" title=\"".htmlspecialchars($file->getMimeType())."\">"); } else { print "getMimeIcon($file->getFileType())."\" title=\"".htmlspecialchars($file->getMimeType())."\">"; } if($file_exists) { print ""; } print "
    \n"; print "
  • ".htmlspecialchars($file->getName())."
  • \n"; print "
  • ".htmlspecialchars($file->getOriginalFileName())."
  • \n"; if ($file_exists) print "
  • ".SeedDMS_Core_File::format_filesize(filesize($dms->contentDir . $file->getPath())) ." bytes, ".htmlspecialchars($file->getMimeType())."
  • "; else print "
  • ".htmlspecialchars($file->getMimeType())." - ".getMLText("document_deleted")."
  • "; print "
  • ".getMLText("uploaded_by")." getEmail()."\">".htmlspecialchars($responsibleUser->getFullName())."
  • "; print "
  • ".getLongReadableDate($file->getDate())."
  • "; if($file->getVersion()) print "
  • ".getMLText('linked_to_current_version')."
  • "; else print "
  • ".getMLText('linked_to_document')."
  • "; print "
".htmlspecialchars($file->getComment())."
\n"; } else printMLText("no_attached_files"); if ($document->getAccessMode($user) >= M_READWRITE){ print "\n"; } $this->contentContainerEnd(); ?>
isAdmin()) { $timeline = $document->getTimeline(); if($timeline) { $this->contentHeading(getMLText("timeline")); foreach($timeline as &$item) { switch($item['type']) { case 'add_version': $msg = getMLText('timeline_'.$item['type'], array('document'=>$item['document']->getName(), 'version'=> $item['version'])); break; case 'add_file': $msg = getMLText('timeline_'.$item['type'], array('document'=>$item['document']->getName())); break; case 'status_change': $msg = getMLText('timeline_'.$item['type'], array('document'=>$item['document']->getName(), 'version'=> $item['version'], 'status'=> getOverallStatusText($item['status']))); break; default: $msg = $this->callHook('getTimelineMsg', $document, $item); if(!is_string($msg)) $msg = '???'; } $item['msg'] = $msg; } // $this->printTimeline('out.ViewDocument.php?action=timelinedata&documentid='.$document->getID(), 300, '', date('Y-m-d')); $this->printTimelineHtml(300); } } ?>
contentEnd(); $this->htmlEndPage(); } /* }}} */ } ?>