Optical rendering of file and image listings
Some checks failed
DokuWiki Default Tasks / all (push) Has been cancelled

This commit is contained in:
2026-01-06 14:34:05 +01:00
parent f8d5dafc62
commit f83248d605
8 changed files with 48 additions and 3 deletions

View File

@@ -238,6 +238,25 @@ abstract class syntax_plugin_luxtools_abstract extends SyntaxPlugin
$renderer->cdata('[n/a: ' . $this->getLang($langKey) . ']');
}
/**
* Render a muted empty-state message (used when a listing has no results).
*
* @param \Doku_Renderer $renderer
* @param string $langKey
* @return void
*/
protected function renderEmptyState(\Doku_Renderer $renderer, string $langKey): void
{
$text = (string)$this->getLang($langKey);
if ($renderer instanceof \Doku_Renderer_xhtml) {
$renderer->doc .= '<div class="filetools-plugin"><div class="luxtools-empty">' . hsc($text) . '</div></div>';
return;
}
$renderer->cdata($text);
}
/**
* Separate a path into base directory and pattern.
*