Skip to content

Commit

Permalink
InfoScreen/MetaData: more prominent download for public access export…
Browse files Browse the repository at this point in the history
… file (44001)
  • Loading branch information
schmitz-ilias committed Feb 5, 2025
1 parent 9892ddc commit 786bbba
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions components/ILIAS/InfoScreen/classes/class.ilInfoScreenGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ public function addMetaDataSections(int $a_rep_obj_id, int $a_obj_id, string $a_
}

// public access export
$public_access_export = $this->buildPublicAccessExportLink($a_rep_obj_id, $a_obj_id);
$public_access_export = $this->buildPublicAccessExportButton($a_rep_obj_id, $a_obj_id);

// output

Expand Down Expand Up @@ -401,22 +401,22 @@ public function addMetaDataSections(int $a_rep_obj_id, int $a_obj_id, string $a_
}
$this->addSection($lng->txt('meta_info_licence_section'));

if ($copyright !== '') { // copyright
if ($public_access_export !== '') { // public access export
$this->addProperty(
$lng->txt("meta_copyright"),
$copyright
$lng->txt('export_info_public_access'),
$public_access_export
);
}

if ($public_access_export !== '') { // public access export
if ($copyright !== '') { // copyright
$this->addProperty(
$lng->txt('export_info_public_access'),
$public_access_export
$lng->txt("meta_copyright"),
$copyright
);
}
}

protected function buildPublicAccessExportLink(int $rep_obj_id, int $obj_id): string
protected function buildPublicAccessExportButton(int $rep_obj_id, int $obj_id): string
{
/*
* This should be replaced by a proper export API
Expand All @@ -443,7 +443,7 @@ protected function buildPublicAccessExportLink(int $rep_obj_id, int $obj_id): st
$ref_id = $this->gui_object->getObject()->getRefId();

return $this->ui->renderer()->render(
$this->ui->factory()->link()->standard(
$this->ui->factory()->button()->standard(
$this->lng->txt('export_info_public_access_download'),
$public_access->downloadLinkOfPublicAccessFile($this->data_factory->refId($ref_id))
)
Expand Down

0 comments on commit 786bbba

Please sign in to comment.