fix: [ui:search_all] Fixed dropdown width to avoid screen overflow for large results

- This will put an end to @gallypette and @adulau's pestering
pull/184/head
Sami Mokaddem 2024-09-24 14:42:30 +02:00
parent ad3a8ee7c5
commit 324767868e
1 changed files with 2 additions and 2 deletions
templates/Instance

View File

@ -20,7 +20,7 @@
foreach ($tableResult['entries'] as $entry) {
if ($entry->getSource() == 'MetaFields') {
$section .= sprintf('<a class="dropdown-item" href="%s">%s</a>',
$section .= sprintf('<a class="dropdown-item" href="%s" style="max-width: 70vw; overflow: hidden; text-overflow: ellipsis;">%s</a>',
Cake\Routing\Router::URL([
'controller' => Cake\Utility\Inflector::pluralize($entry->scope),
'action' => 'view',
@ -29,7 +29,7 @@
sprintf('%s (%s::%s)', h($entry->value), h($entry->scope), h($entry->field))
);
} else {
$section .= sprintf('<a class="dropdown-item" href="%s">%s</a>',
$section .= sprintf('<a class="dropdown-item" href="%s" style="max-width: 70vw; overflow: hidden; text-overflow: ellipsis;">%s</a>',
Cake\Routing\Router::URL([
'controller' => Cake\Utility\Inflector::pluralize($entry->getSource()),
'action' => 'view',