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> </div>
<?php <?php
if($user->isAdmin()) { if($user->isAdmin()) {
$this->contentHeading(getMLText("timeline"));
$timeline = $document->getTimeline(); $timeline = $document->getTimeline();
if($timeline) { if($timeline) {
$this->contentHeading(getMLText("timeline"));
foreach($timeline as &$item) { foreach($timeline as &$item) {
switch($item['type']) { switch($item['type']) {
case 'add_version': case 'add_version':