do not show subheader of timeline if empty

This commit is contained in:
Uwe Steinmann 2015-09-23 15:50:04 +02:00
parent 3f82cb1957
commit 659f788de4

View File

@ -1113,9 +1113,9 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
</div>
<?php
if($user->isAdmin()) {
$this->contentHeading(getMLText("timeline"));
$timeline = $document->getTimeline();
if($timeline) {
$this->contentHeading(getMLText("timeline"));
foreach($timeline as &$item) {
switch($item['type']) {
case 'add_version':