Remove superfluous span wrapper without attribute of Text

This commit is contained in:
Sukhwinder Dhillon 2025-03-28 09:15:45 +01:00 committed by Johannes Meyer
parent 7bb92faa56
commit 95a6992bb0
7 changed files with 10 additions and 14 deletions

View file

@ -140,23 +140,19 @@ class CommentRenderer implements ItemRenderer
public function assembleExtendedInfo($item, HtmlDocument $info, string $layout): void
{
if ($item->expire_time) {
$info->addHtml(new HtmlElement(
'span',
null,
$info->addHtml(
FormattedString::create(
$this->translate("expires %s"),
new TimeUntil($item->expire_time->getTimestamp())
)
));
);
} else {
$info->addHtml(new HtmlElement(
'span',
null,
$info->addHtml(
FormattedString::create(
$this->translate("created %s"),
new TimeAgo($item->entry_time->getTimestamp())
)
));
);
}
}

View file

@ -151,7 +151,7 @@ class HostgroupGridRenderer implements ItemRenderer
public function assembleCaption($item, HtmlDocument $caption, string $layout): void
{
$caption->addHtml(new HtmlElement('span', null, Text::create($item->name)));
$caption->addHtml(Text::create($item->name));
}
public function assembleExtendedInfo($item, HtmlDocument $info, string $layout): void

View file

@ -64,7 +64,7 @@ class HostgroupRenderer implements ItemTableRenderer
public function assembleCaption($item, HtmlDocument $caption, string $layout): void
{
$caption->addHtml(new HtmlElement('span', null, Text::create($item->name)));
$caption->addHtml(Text::create($item->name));
}
public function assembleExtendedInfo($item, HtmlDocument $info, string $layout): void

View file

@ -241,7 +241,7 @@ class ServicegroupGridRenderer implements ItemRenderer
public function assembleCaption($item, HtmlDocument $caption, string $layout): void
{
$caption->addHtml(new HtmlElement('span', null, Text::create($item->name)));
$caption->addHtml(Text::create($item->name));
}
public function assembleExtendedInfo($item, HtmlDocument $info, string $layout): void

View file

@ -63,7 +63,7 @@ class ServicegroupRenderer implements ItemTableRenderer
public function assembleCaption($item, HtmlDocument $caption, string $layout): void
{
$caption->addHtml(new HtmlElement('span', null, Text::create($item->name)));
$caption->addHtml(Text::create($item->name));
}
public function assembleExtendedInfo($item, HtmlDocument $info, string $layout): void

View file

@ -45,7 +45,7 @@ class UserRenderer implements ItemRenderer
public function assembleCaption($item, HtmlDocument $caption, string $layout): void
{
$caption->addHtml(new HtmlElement('span', null, Text::create($item->name)));
$caption->addHtml(Text::create($item->name));
}
public function assembleExtendedInfo($item, HtmlDocument $info, string $layout): void

View file

@ -45,7 +45,7 @@ class UsergroupRenderer implements ItemRenderer
public function assembleCaption($item, HtmlDocument $caption, string $layout): void
{
$caption->addHtml(new HtmlElement('span', null, Text::create($item->name)));
$caption->addHtml(Text::create($item->name));
}
public function assembleExtendedInfo($item, HtmlDocument $info, string $layout): void