do not run documentListRow(Start|End) if lastContent is null

This commit is contained in:
Uwe Steinmann 2019-11-28 09:18:01 +01:00
parent babba864a1
commit dabf821b6a

View File

@ -2477,9 +2477,6 @@ $('body').on('click', '[id^=\"table-row-document\"] td:nth-child(2)', function(e
if (strlen($comment) > 150) $comment = substr($comment, 0, 147) . "..."; if (strlen($comment) > 150) $comment = substr($comment, 0, 147) . "...";
$docID = $document->getID(); $docID = $document->getID();
if(!$skipcont)
$content .= $this->documentListRowStart($document);
if($version) { if($version) {
$latestContent = $this->callHook('documentContent', $document, $version); $latestContent = $this->callHook('documentContent', $document, $version);
if($latestContent === null) if($latestContent === null)
@ -2491,6 +2488,9 @@ $('body').on('click', '[id^=\"table-row-document\"] td:nth-child(2)', function(e
} }
if($latestContent) { if($latestContent) {
if(!$skipcont)
$content .= $this->documentListRowStart($document);
$previewer->createPreview($latestContent); $previewer->createPreview($latestContent);
$version = $latestContent->getVersion(); $version = $latestContent->getVersion();
$status = $latestContent->getStatus(); $status = $latestContent->getStatus();
@ -2610,9 +2610,9 @@ $('body').on('click', '[id^=\"table-row-document\"] td:nth-child(2)', function(e
} }
$content .= "</div>"; $content .= "</div>";
$content .= "</td>"; $content .= "</td>";
}
if(!$skipcont) if(!$skipcont)
$content .= $this->documentListRowEnd($document); $content .= $this->documentListRowEnd($document);
}
return $content; return $content;
} /* }}} */ } /* }}} */