Skip to content

Commit 1d7c9fd

Browse files
authored
Merge pull request #876 from PermanentOrg/869-fix-templates
Fix Angular templates to support migration
2 parents 06c4cb7 + eb54908 commit 1d7c9fd

File tree

5 files changed

+60
-62
lines changed

5 files changed

+60
-62
lines changed

src/app/core/components/profile-edit/profile-edit.component.html

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -424,11 +424,7 @@
424424
</div>
425425
</div>
426426
</div>
427-
<div
428-
class="profile-section-header"
429-
prScrollSection="milestones"
430-
[ngSwitch]="archive.type"
431-
>
427+
<div class="profile-section-header" prScrollSection="milestones">
432428
Milestones
433429
</div>
434430
<div class="profile-section">

src/app/file-browser/components/file-viewer/file-viewer.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
[bgSrc]="record.thumbURL200"
2828
*ngIf="isQueued(i)"
2929
></div>
30-
<div *ngIf="currentRecord === record" class="full" [ngSwitch]="">
30+
<div *ngIf="currentRecord === record" class="full">
3131
<pr-zooming-image-viewer
3232
[item]="currentRecord"
3333
(disableSwipe)="toggleSwipe($event)"

src/app/file-browser/components/publish/publish.component.html

Lines changed: 44 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -43,58 +43,60 @@
4343
Publish
4444
</button>
4545
</div>
46-
<ng-container *ngIf="publicItem" [ngSwitch]="publishIa">
46+
<ng-container *ngIf="publicItem">
4747
<hr />
4848
<img
4949
src="assets/img/internetarchive/IALogo.png"
5050
alt="Internet Archive"
5151
class="internet-archive-logo"
5252
/>
53-
<div class="public-link-button" *ngSwitchCase="null">
54-
<p>
55-
This item can also be published to the Internet Archive.
56-
<a
57-
href="https://desk.zoho.com/portal/permanent/en/kb/articles/publishing-to-the-internet-archive"
58-
target="_blank"
59-
>Learn more about publishing to the Internet Archive.</a
60-
>
61-
</p>
62-
<button
63-
class="btn btn-primary publish-to-archive"
64-
(click)="publishItemToInternetArchive()"
65-
[disabled]="waiting || !isAtleastManager"
66-
>
67-
Publish to Internet Archive
68-
</button>
69-
</div>
70-
<div class="public-link" *ngSwitchDefault>
71-
<p>
72-
When processed, you can view this item on the Internet Archive with
73-
the link provided. Processing may take several minutes.
74-
</p>
75-
<input
76-
type="text"
77-
class="form-control"
78-
readonly
79-
[value]="publishIa.permalink"
80-
#iaLinkInput
81-
/>
82-
<div class="buttons">
53+
<ng-container [ngSwitch]="publishIa">
54+
<div class="public-link-button" *ngSwitchCase="null">
55+
<p>
56+
This item can also be published to the Internet Archive.
57+
<a
58+
href="https://desk.zoho.com/portal/permanent/en/kb/articles/publishing-to-the-internet-archive"
59+
target="_blank"
60+
>Learn more about publishing to the Internet Archive.</a
61+
>
62+
</p>
8363
<button
84-
class="btn btn-primary"
85-
[disabled]="iaLinkCopied"
86-
(click)="copyInternetArchiveLink()"
64+
class="btn btn-primary publish-to-archive"
65+
(click)="publishItemToInternetArchive()"
66+
[disabled]="waiting || !isAtleastManager"
8767
>
88-
{{ iaLinkCopied ? 'Link copied' : 'Copy link' }}
68+
Publish to Internet Archive
8969
</button>
90-
<a
91-
class="btn btn-primary"
92-
[href]="publishIa.permalink"
93-
target="_blank"
94-
>View on web</a
95-
>
9670
</div>
97-
</div>
71+
<div class="public-link" *ngSwitchDefault>
72+
<p>
73+
When processed, you can view this item on the Internet Archive with
74+
the link provided. Processing may take several minutes.
75+
</p>
76+
<input
77+
type="text"
78+
class="form-control"
79+
readonly
80+
[value]="publishIa.permalink"
81+
#iaLinkInput
82+
/>
83+
<div class="buttons">
84+
<button
85+
class="btn btn-primary"
86+
[disabled]="iaLinkCopied"
87+
(click)="copyInternetArchiveLink()"
88+
>
89+
{{ iaLinkCopied ? 'Link copied' : 'Copy link' }}
90+
</button>
91+
<a
92+
class="btn btn-primary"
93+
[href]="publishIa.permalink"
94+
target="_blank"
95+
>View on web</a
96+
>
97+
</div>
98+
</div>
99+
</ng-container>
98100
<hr />
99101
</ng-container>
100102
</div>

src/app/share-preview/components/share-preview/share-preview.component.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -321,14 +321,14 @@
321321
[disabled]="waiting || hasRequested"
322322
*ngIf="isLinkShare"
323323
>
324-
<ng-container *ngIf="hasRequested; else accessText"
324+
<ng-container *ngIf="hasRequested; else accessTextFooter"
325325
>Access Requested</ng-container
326326
>
327-
<ng-template #accessText>
328-
<ng-container *ngIf="isAutoApprove; else requestAccess"
327+
<ng-template #accessTextFooter>
328+
<ng-container *ngIf="isAutoApprove; else requestAccessFooter"
329329
>Accept Share</ng-container
330330
>
331-
<ng-template #requestAccess>Request Access</ng-template>
331+
<ng-template #requestAccessFooter>Request Access</ng-template>
332332
</ng-template>
333333
</button>
334334
</div>

src/app/shared/components/inline-value-edit/inline-value-edit.component.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -279,14 +279,14 @@
279279
</div>
280280
</div>
281281
</ng-container>
282-
<ng-template #inlineControls>
283-
<div class="inline-value-controls" *ngIf="isEditing" @ngIfScaleAnimation>
284-
<button class="btn btn-primary btn-sm" (click)="save()" type="submit">
285-
Save
286-
</button>
287-
<button class="btn btn-secondary btn-sm" (click)="cancel()" type="button">
288-
Cancel
289-
</button>
290-
</div>
291-
</ng-template>
292282
</ng-container>
283+
<ng-template #inlineControls>
284+
<div class="inline-value-controls" *ngIf="isEditing" @ngIfScaleAnimation>
285+
<button class="btn btn-primary btn-sm" (click)="save()" type="submit">
286+
Save
287+
</button>
288+
<button class="btn btn-secondary btn-sm" (click)="cancel()" type="button">
289+
Cancel
290+
</button>
291+
</div>
292+
</ng-template>

0 commit comments

Comments
 (0)