Skip to content

Commit

Permalink
I made URIs clickable in the full item view
Browse files Browse the repository at this point in the history
  • Loading branch information
aseyedia committed Jul 2, 2024
1 parent f602470 commit 8f925fc
Showing 1 changed file with 41 additions and 39 deletions.
Original file line number Diff line number Diff line change
@@ -1,45 +1,47 @@
<div class="container" *ngVar="(itemRD$ | async) as itemRD">
<div class="item-page" *ngIf="itemRD?.hasSucceeded" @fadeInOut>
<div *ngIf="itemRD?.payload as item">
<ds-themed-item-alerts [item]="item"></ds-themed-item-alerts>
<ds-item-versions-notice [item]="item"></ds-item-versions-notice>
<ds-view-tracker [object]="item"></ds-view-tracker>
<div *ngIf="!item.isWithdrawn || (isAdmin$|async)" class="full-item-info">
<div class="d-flex flex-row">
<ds-themed-item-page-title-field class="mr-auto" [item]="item"></ds-themed-item-page-title-field>
<ds-dso-edit-menu></ds-dso-edit-menu>
</div>
<div class="simple-view-link my-3" *ngIf="!fromSubmissionObject">
<a class="btn btn-outline-primary" [routerLink]="[(itemPageRoute$ | async)]">
{{"item.page.link.simple" | translate}}
</a>
</div>
<div class="table-responsive">
<table class="table table-striped">
<tbody>
<ng-container *ngFor="let mdEntry of (metadata$ | async) | keyvalue">
<tr *ngFor="let mdValue of mdEntry.value">
<td>{{mdEntry.key}}</td>
<td class="preserve-line-breaks">{{mdValue.value}}</td>
<td>{{mdValue.language}}</td>
</tr>
</ng-container>
</tbody>
</table>
</div>
<ds-themed-item-page-full-file-section [item]="item"></ds-themed-item-page-full-file-section>
<ds-item-page-collections [item]="item"></ds-item-page-collections>
<ds-item-versions class="mt-2" [item]="item"></ds-item-versions>
<div class="button-row bottom" *ngIf="fromSubmissionObject">
<div class="text-right">
<button class="btn btn-outline-secondary mr-1" (click)="back()"><i
class="fas fa-arrow-left"></i> {{'item.page.return' | translate}}</button>
</div>
<div class="item-page" *ngIf="itemRD?.hasSucceeded" @fadeInOut>
<div *ngIf="itemRD?.payload as item">
<ds-themed-item-alerts [item]="item"></ds-themed-item-alerts>
<ds-item-versions-notice [item]="item"></ds-item-versions-notice>
<ds-view-tracker [object]="item"></ds-view-tracker>
<div *ngIf="!item.isWithdrawn || (isAdmin$|async)" class="full-item-info">
<div class="d-flex flex-row">
<ds-themed-item-page-title-field class="mr-auto" [item]="item"></ds-themed-item-page-title-field>
<ds-dso-edit-menu></ds-dso-edit-menu>
</div>
<div class="simple-view-link my-3" *ngIf="!fromSubmissionObject">
<a class="btn btn-outline-primary" [routerLink]="[(itemPageRoute$ | async)]">
{{"item.page.link.simple" | translate}}
</a>
</div>
<div class="table-responsive">
<table class="table table-striped">
<tbody>
<ng-container *ngFor="let mdEntry of (metadata$ | async) | keyvalue">
<tr *ngFor="let mdValue of mdEntry.value">
<td>{{mdEntry.key}}</td>
<td class="preserve-line-breaks">
<a *ngIf="mdEntry.key.endsWith('.uri')" [href]="mdValue.value" target="_blank">{{mdValue.value}}</a>
<span *ngIf="!mdEntry.key.endsWith('.uri')">{{mdValue.value}}</span>
</td>
<td>{{mdValue.language}}</td>
</tr>
</ng-container>
</tbody>
</table>
</div>
<ds-themed-item-page-full-file-section [item]="item"></ds-themed-item-page-full-file-section>
<ds-item-page-collections [item]="item"></ds-item-page-collections>
<ds-item-versions class="mt-2" [item]="item"></ds-item-versions>
<div class="button-row bottom" *ngIf="fromSubmissionObject">
<div class="text-right">
<button class="btn btn-outline-secondary mr-1" (click)="back()"><i
class="fas fa-arrow-left"></i> {{'item.page.return' | translate}}</button>
</div>
</div>
</div>
</div>
<ds-error *ngIf="itemRD?.hasFailed" message="{{'error.item' | translate}}"></ds-error>
<ds-themed-loading *ngIf="itemRD?.isLoading" message="{{'loading.item' | translate}}"></ds-themed-loading>
</div>

<ds-error *ngIf="itemRD?.hasFailed" message="{{'error.item' | translate}}"></ds-error>
<ds-themed-loading *ngIf="itemRD?.isLoading" message="{{'loading.item' | translate}}"></ds-themed-loading>
</div>

0 comments on commit 8f925fc

Please sign in to comment.