Client tool

This commit is contained in:
2026-01-05 13:05:21 +01:00
parent c442c0df1e
commit b64d4d91ff
9 changed files with 378 additions and 15 deletions

View File

@@ -73,7 +73,19 @@ class syntax_plugin_filetools_open extends SyntaxPlugin
return true;
}
$renderer->doc .= '<button type="button" class="filetools-open" data-path="' . hsc($path) . '">' . hsc($caption) . '</button>';
$serviceUrl = trim((string)$this->getConf('open_service_url'));
$serviceToken = trim((string)$this->getConf('open_service_token'));
$attrs = ' type="button" class="filetools-open"'
. ' data-path="' . hsc($path) . '"';
if ($serviceUrl !== '') {
$attrs .= ' data-service-url="' . hsc($serviceUrl) . '"';
}
if ($serviceToken !== '') {
$attrs .= ' data-service-token="' . hsc($serviceToken) . '"';
}
$renderer->doc .= '<button' . $attrs . '>' . hsc($caption) . '</button>';
return true;
}
}