From 86d5c61f6c0d21ed90fc72b4ac41d63f9d87cded Mon Sep 17 00:00:00 2001 From: Maria Homann Date: Thu, 30 Jul 2026 11:41:29 +0200 Subject: [PATCH] [FEATURE] 8869_1357 bibliographic list item make urls clickable - Feature Request: https://docu.ilias.de/go/wiki/wpage_8869_1357 --- .../Entry/class.ilBiblEntryDetailPresentationGUI.php | 5 ++++- .../classes/Entry/class.ilBiblEntryTableGUI.php | 8 +++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/components/ILIAS/Bibliographic/classes/Entry/class.ilBiblEntryDetailPresentationGUI.php b/components/ILIAS/Bibliographic/classes/Entry/class.ilBiblEntryDetailPresentationGUI.php index b702055766a4..f9a1a5fac344 100755 --- a/components/ILIAS/Bibliographic/classes/Entry/class.ilBiblEntryDetailPresentationGUI.php +++ b/components/ILIAS/Bibliographic/classes/Entry/class.ilBiblEntryDetailPresentationGUI.php @@ -27,6 +27,7 @@ */ class ilBiblEntryDetailPresentationGUI { + private \ILIAS\Refinery\String\Group $string_transform; /** * ilBiblEntryPresentationGUI constructor. */ @@ -40,9 +41,11 @@ public function __construct( protected ilTabsGUI $tabs, protected UIServices $ui ) { + global $DIC; $this->initHelp(); $this->initTabs(); $this->initPermanentLink(); + $this->string_transform = $DIC->refinery()->string(); } @@ -113,7 +116,7 @@ private function getOverviewPanel(): Sub $data = []; foreach ($sorted as $attribute) { $translated = $this->facade->translationFactory()->translateAttribute($attribute); - $data[$translated] = $attribute->getValue(); + $data[$translated] = $this->string_transform->makeClickable()->transform($attribute->getValue()); } $content = $this->ui->factory()->listing()->characteristicValue()->text($data); diff --git a/components/ILIAS/Bibliographic/classes/Entry/class.ilBiblEntryTableGUI.php b/components/ILIAS/Bibliographic/classes/Entry/class.ilBiblEntryTableGUI.php index a30d7b07a3b7..661fe1193622 100755 --- a/components/ILIAS/Bibliographic/classes/Entry/class.ilBiblEntryTableGUI.php +++ b/components/ILIAS/Bibliographic/classes/Entry/class.ilBiblEntryTableGUI.php @@ -47,6 +47,7 @@ class ilBiblEntryTableGUI private readonly ilUIService $ui_service; private ?StandardFilter $filter; private PresentationTable $table; + private \ILIAS\Refinery\String\Group $string_transform; /** @var ilBiblFieldFilterInterface[] */ protected array $filter_objects = []; @@ -69,6 +70,7 @@ public function __construct( $this->filter = $this->buildFilter(); $this->table = $this->buildTable(); + $this->string_transform = $DIC->refinery()->string(); } public function getRenderedTableAndExistingFilters(): string @@ -192,6 +194,10 @@ function ( unset($record['author'], $record['title'], $record['AU'], $record['TI'], $record['entry_id']); $translated_record = $this->getRecordWithTranslatedKeys($record); + $clickable_translated_record = array_map( + fn($value) => $this->string_transform->makeClickable()->transform($value), + $translated_record + ); $this->ctrl->setParameterByClass(ilObjBibliographicGUI::class, 'entry_id', $entry_id); @@ -209,7 +215,7 @@ function ( ->withSubheadline($author) ->withImportantFields([$year]) ->withFurtherFields($this->renderLibraryButtons($entry_id)) - ->withContent($ui_factory->listing()->descriptive($translated_record)); + ->withContent($ui_factory->listing()->descriptive($clickable_translated_record)); } )->withData($records_current_page); }