remove old code for getting timeline items

This commit is contained in:
Uwe Steinmann 2020-09-23 08:44:47 +02:00
parent ca1dce466d
commit 76c02d89c7

View File

@ -1534,30 +1534,8 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
</div> </div>
<?php <?php
if($user->isAdmin()) { if($user->isAdmin()) {
$timeline = $latestContent->getDocument()->getTimeline(); $this->contentHeading(getMLText("timeline"));
if($timeline) { $this->printTimelineHtml(300);
$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', $latestContent->getDocument(), $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);
}
} }
?> ?>
</div> </div>