call hook showVersionComment() for previous versions, check if comment is set at all

This commit is contained in:
Uwe Steinmann 2018-07-13 12:27:30 +02:00
parent 7ec84597eb
commit 6553f7a379

View File

@ -626,7 +626,8 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
if($txt) {
echo $txt;
} else {
print "<p style=\"font-style: italic;\">".htmlspecialchars($latestContent->getComment())."</p>";
if($latestContent->getComment())
print "<p style=\"font-style: italic;\">".htmlspecialchars($latestContent->getComment())."</p>";
}
print "<ul class=\"actions unstyled\">\n";
$attributes = $latestContent->getAttributes();
@ -1505,8 +1506,13 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
print "<li>".getMLText("uploaded_by")." <a href=\"mailto:".$updatingUser->getEmail()."\">".htmlspecialchars($updatingUser->getFullName())."</a></li>";
print "<li>".getLongReadableDate($version->getDate())."</li>";
print "</ul>\n";
if($version->getComment())
print "<p style=\"font-style: italic;\">".htmlspecialchars($version->getComment())."</p>";
$txt = $this->callHook('showVersionComment', $version);
if($txt) {
echo $txt;
} else {
if($version->getComment())
print "<p style=\"font-style: italic;\">".htmlspecialchars($version->getComment())."</p>";
}
print "<ul class=\"actions unstyled\">\n";
$attributes = $version->getAttributes();
if($attributes) {