Skip to content

Commit

Permalink
Use URL web root for Access Copies links. (#1744)
Browse files Browse the repository at this point in the history
  • Loading branch information
melaniekung committed Jan 30, 2024
1 parent 3094418 commit 1da4fc3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions apps/qubit/modules/digitalobject/templates/_metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@

<?php if ($showMasterFileName) { ?>
<?php if ($canAccessMasterFile) { ?>
<?php echo render_show(__('Filename'), link_to($resource->name, $resource->object->getDigitalObjectUrl(), ['target' => '_blank']), ['fieldLabel' => 'filename']); ?>
<?php echo render_show(__('Filename'), link_to($resource->name, public_path($resource->object->getDigitalObjectUrl()), ['target' => '_blank']), ['fieldLabel' => 'filename']); ?>
<?php } else { ?>
<?php echo render_show(__('Filename'), $resource->name, ['fieldLabel' => 'filename']); ?>
<?php } ?>
Expand Down Expand Up @@ -172,7 +172,7 @@
<div class="digital-object-metadata-body">
<?php if ($showReferenceCopyFileName) { ?>
<?php if ($canAccessReferenceCopy && $sf_user->isAuthenticated()) { ?>
<?php echo render_show(__('Filename'), link_to($referenceCopy->name, $referenceCopy->getFullPath(), ['target' => '_blank']), ['fieldLabel' => 'referenceCopyFileName']); ?>
<?php echo render_show(__('Filename'), link_to($referenceCopy->name, public_path($referenceCopy->getFullPath()), ['target' => '_blank']), ['fieldLabel' => 'referenceCopyFileName']); ?>
<?php } else { ?>
<?php echo render_show(__('Filename'), $referenceCopy->name, ['fieldLabel' => 'referenceCopyFileName']); ?>
<?php } ?>
Expand Down Expand Up @@ -211,7 +211,7 @@
<div class="digital-object-metadata-body">
<?php if ($showThumbnailCopyFileName) { ?>
<?php if ($canAccessThumbnailCopy) { ?>
<?php echo render_show(__('Filename'), link_to($thumbnailCopy->name, $thumbnailCopy->getFullPath(), ['target' => '_blank']), ['fieldLabel' => 'thumbnailCopyFileName']); ?>
<?php echo render_show(__('Filename'), link_to($thumbnailCopy->name, public_path($thumbnailCopy->getFullPath()), ['target' => '_blank']), ['fieldLabel' => 'thumbnailCopyFileName']); ?>
<?php } else { ?>
<?php echo render_show(__('Filename'), $thumbnailCopy->name, ['fieldLabel' => 'thumbnailCopyFileName']); ?>
<?php } ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@

<?php if ($showMasterFileName) { ?>
<?php if ($canAccessMasterFile) { ?>
<?php echo render_show(__('Filename'), link_to($resource->name, $resource->object->getDigitalObjectUrl(), ['target' => '_blank']), ['fieldLabel' => 'filename', 'isSubField' => true]); ?>
<?php echo render_show(__('Filename'), link_to($resource->name, public_path($resource->object->getDigitalObjectUrl()), ['target' => '_blank']), ['fieldLabel' => 'filename', 'isSubField' => true]); ?>
<?php } else { ?>
<?php echo render_show(__('Filename'), $resource->name, ['fieldLabel' => 'filename', 'isSubField' => true]); ?>
<?php } ?>
Expand Down Expand Up @@ -201,7 +201,7 @@
<div class="digital-object-metadata-body <?php echo render_b5_show_value_css_classes(); ?>">
<?php if ($showReferenceCopyFileName) { ?>
<?php if ($canAccessReferenceCopy && $sf_user->isAuthenticated()) { ?>
<?php echo render_show(__('Filename'), link_to($referenceCopy->name, $referenceCopy->getFullPath(), ['target' => '_blank']), ['fieldLabel' => 'referenceCopyFileName', 'isSubField' => true]); ?>
<?php echo render_show(__('Filename'), link_to($referenceCopy->name, public_path($referenceCopy->getFullPath()), ['target' => '_blank']), ['fieldLabel' => 'referenceCopyFileName', 'isSubField' => true]); ?>
<?php } else { ?>
<?php echo render_show(__('Filename'), $referenceCopy->name, ['fieldLabel' => 'referenceCopyFileName', 'isSubField' => true]); ?>
<?php } ?>
Expand Down Expand Up @@ -241,7 +241,7 @@
<div class="digital-object-metadata-body <?php echo render_b5_show_value_css_classes(); ?>">
<?php if ($showThumbnailCopyFileName) { ?>
<?php if ($canAccessThumbnailCopy) { ?>
<?php echo render_show(__('Filename'), link_to($thumbnailCopy->name, $thumbnailCopy->getFullPath(), ['target' => '_blank']), ['fieldLabel' => 'thumbnailCopyFileName', 'isSubField' => true]); ?>
<?php echo render_show(__('Filename'), link_to($thumbnailCopy->name, public_path($thumbnailCopy->getFullPath()), ['target' => '_blank']), ['fieldLabel' => 'thumbnailCopyFileName', 'isSubField' => true]); ?>
<?php } else { ?>
<?php echo render_show(__('Filename'), $thumbnailCopy->name, ['fieldLabel' => 'thumbnailCopyFileName', 'isSubField' => true]); ?>
<?php } ?>
Expand Down

0 comments on commit 1da4fc3

Please sign in to comment.