mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Show full paths of elements on hover in part tables
Related to discussion #312
This commit is contained in:
parent
d38ac652fc
commit
b941b97eee
2 changed files with 5 additions and 2 deletions
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||
namespace App\DataTables\Column;
|
||||
|
||||
use App\Entity\Base\AbstractNamedDBElement;
|
||||
use App\Entity\Base\AbstractStructuralDBElement;
|
||||
use App\Services\EntityURLGenerator;
|
||||
use Omines\DataTablesBundle\Column\AbstractColumn;
|
||||
use Symfony\Component\OptionsResolver\Options;
|
||||
|
@ -70,8 +71,9 @@ class EntityColumn extends AbstractColumn
|
|||
if ($entity instanceof AbstractNamedDBElement) {
|
||||
if (null !== $entity->getID()) {
|
||||
return sprintf(
|
||||
'<a href="%s">%s</a>',
|
||||
'<a href="%s" title="%s">%s</a>',
|
||||
$this->urlGenerator->listPartsURL($entity),
|
||||
$entity instanceof AbstractStructuralDBElement ? htmlspecialchars($entity->getFullPath()) : htmlspecialchars($entity->getName()),
|
||||
htmlspecialchars($entity->getName())
|
||||
);
|
||||
}
|
||||
|
|
|
@ -144,8 +144,9 @@ final class PartsDataTable implements DataTableTypeInterface
|
|||
continue;
|
||||
}
|
||||
$tmp[] = sprintf(
|
||||
'<a href="%s">%s</a>',
|
||||
'<a href="%s" title="%s">%s</a>',
|
||||
$this->urlGenerator->listPartsURL($lot->getStorageLocation()),
|
||||
htmlspecialchars($lot->getStorageLocation()->getFullPath()),
|
||||
htmlspecialchars($lot->getStorageLocation()->getName())
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue