|
37 | 37 | }
|
38 | 38 | }
|
39 | 39 |
|
40 |
| - <div class="flex ml-auto"> |
41 |
| - <div class="flex flex-1 flex-column-reverse gap-3 justify-content-end sm:gap-3 sm:flex-row-reverse lg:flex-row"> |
42 |
| - @if (resource.storage && !isCollectionsRoute()) { |
43 |
| - <p class="font-bold mr-2 ml-0 mt-2 sm:ml-2 sm:mt-0 sm:align-self-center storage"> |
44 |
| - {{ +resource.storage.storageUsage | fileSize }} |
45 |
| - </p> |
46 |
| - } |
47 |
| - |
48 |
| - <div class="flex gap-2 justify-content-start"> |
49 |
| - @if (showViewOnlyLinks() && canEdit()) { |
50 |
| - <p-button |
51 |
| - class="flex" |
52 |
| - [pTooltip]="'project.overview.tooltips.viewOnlyLinks' | translate" |
53 |
| - tooltipPosition="bottom" |
54 |
| - [routerLink]="'../contributors'" |
55 |
| - [ariaLabel]="'project.overview.tooltips.viewOnlyLinks' | translate" |
56 |
| - > |
57 |
| - <span class="font-bold">{{ resource.viewOnlyLinksCount }}</span> |
58 |
| - <i class="fas fa-link text-2xl"></i> |
59 |
| - </p-button> |
| 40 | + @if (!hasNoPermissions()) { |
| 41 | + <div class="flex ml-auto"> |
| 42 | + <div class="flex flex-1 flex-column-reverse gap-3 justify-content-end sm:gap-3 sm:flex-row-reverse lg:flex-row"> |
| 43 | + @if (resource.storage && !isCollectionsRoute()) { |
| 44 | + <p class="font-bold mr-2 ml-0 mt-2 sm:ml-2 sm:mt-0 sm:align-self-center storage"> |
| 45 | + {{ +resource.storage.storageUsage | fileSize }} |
| 46 | + </p> |
60 | 47 | }
|
61 | 48 |
|
62 |
| - @if (resource.resourceType === ResourceType.Project && !hasViewOnly()) { |
63 |
| - <p-button |
64 |
| - class="flex" |
65 |
| - (click)="forkActionMenu.toggle($event)" |
66 |
| - [pTooltip]="'project.overview.tooltips.duplicate' | translate" |
67 |
| - tooltipPosition="bottom" |
68 |
| - [ariaLabel]="'project.overview.tooltips.duplicate' | translate" |
69 |
| - > |
70 |
| - <span class="font-bold">{{ resource.forksCount }}</span> |
71 |
| - <i class="fas fa-clone text-2xl"></i> |
72 |
| - <p-menu appendTo="body" #forkActionMenu [model]="forkActionItems" popup> |
73 |
| - <ng-template #item let-item> |
74 |
| - <a class="p-menu-item-link"> |
75 |
| - {{ item.label | translate }} |
76 |
| - </a> |
77 |
| - </ng-template> |
78 |
| - </p-menu> |
79 |
| - </p-button> |
80 |
| - } |
| 49 | + <div class="flex gap-2 justify-content-start"> |
| 50 | + @if (showViewOnlyLinks() && canEdit()) { |
| 51 | + <p-button |
| 52 | + class="flex" |
| 53 | + [pTooltip]="'project.overview.tooltips.viewOnlyLinks' | translate" |
| 54 | + tooltipPosition="bottom" |
| 55 | + [routerLink]="'../contributors'" |
| 56 | + [ariaLabel]="'project.overview.tooltips.viewOnlyLinks' | translate" |
| 57 | + > |
| 58 | + <span class="font-bold">{{ resource.viewOnlyLinksCount }}</span> |
| 59 | + <i class="fas fa-link text-2xl"></i> |
| 60 | + </p-button> |
| 61 | + } |
81 | 62 |
|
82 |
| - @if (!hasViewOnly()) { |
83 |
| - <p-button |
84 |
| - [pTooltip]="'project.overview.tooltips.bookmarks' | translate" |
85 |
| - tooltipPosition="bottom" |
86 |
| - class="flex" |
87 |
| - (onClick)="toggleBookmark()" |
88 |
| - [loading]="isBookmarksLoading() || isBookmarksSubmitting()" |
89 |
| - [ariaLabel]="'project.overview.tooltips.bookmarks' | translate" |
90 |
| - > |
91 |
| - @if (!isBookmarksLoading() && !isBookmarksSubmitting()) { |
92 |
| - <i class="text-2xl" [ngClass]="isBookmarked() ? 'fas fa-bookmark' : 'far fa-bookmark'"></i> |
93 |
| - } |
94 |
| - </p-button> |
95 |
| - } |
| 63 | + @if (resource.resourceType === ResourceType.Project && !hasViewOnly()) { |
| 64 | + <p-button |
| 65 | + class="flex" |
| 66 | + (click)="forkActionMenu.toggle($event)" |
| 67 | + [pTooltip]="'project.overview.tooltips.duplicate' | translate" |
| 68 | + tooltipPosition="bottom" |
| 69 | + [ariaLabel]="'project.overview.tooltips.duplicate' | translate" |
| 70 | + > |
| 71 | + <span class="font-bold">{{ resource.forksCount }}</span> |
| 72 | + <i class="fas fa-clone text-2xl"></i> |
| 73 | + <p-menu appendTo="body" #forkActionMenu [model]="forkActionItems" popup> |
| 74 | + <ng-template #item let-item> |
| 75 | + <a class="p-menu-item-link"> |
| 76 | + {{ item.label | translate }} |
| 77 | + </a> |
| 78 | + </ng-template> |
| 79 | + </p-menu> |
| 80 | + </p-button> |
| 81 | + } |
96 | 82 |
|
97 |
| - @if (resource.isPublic && !hasViewOnly()) { |
98 |
| - <p-button |
99 |
| - class="flex" |
100 |
| - (onClick)="socialsActionMenu.toggle($event)" |
101 |
| - [pTooltip]="'project.overview.tooltips.share' | translate" |
102 |
| - tooltipPosition="bottom" |
103 |
| - [ariaLabel]="'project.overview.tooltips.share' | translate" |
104 |
| - > |
105 |
| - <span class="font-bold">{{ socialsActionItems().length }}</span> |
106 |
| - <i class="fas fa-share-nodes text-2xl"></i> |
107 |
| - <p-menu appendTo="body" #socialsActionMenu [model]="socialsActionItems()" popup> |
108 |
| - <ng-template #item let-item> |
109 |
| - <a class="p-menu-item-link" [href]="item.url" target="_blank" rel="noopener noreferrer"> |
110 |
| - <div class="social-link flex align-items-center justify-content-center"> |
111 |
| - <osf-icon [iconClass]="`${item.icon} fa-sm`"></osf-icon> |
112 |
| - </div> |
113 |
| - {{ item.label | translate }} |
114 |
| - </a> |
115 |
| - </ng-template> |
116 |
| - </p-menu> |
117 |
| - </p-button> |
118 |
| - } |
| 83 | + @if (!hasViewOnly()) { |
| 84 | + <p-button |
| 85 | + [pTooltip]="'project.overview.tooltips.bookmarks' | translate" |
| 86 | + tooltipPosition="bottom" |
| 87 | + class="flex" |
| 88 | + (onClick)="toggleBookmark()" |
| 89 | + [loading]="isBookmarksLoading() || isBookmarksSubmitting()" |
| 90 | + [ariaLabel]="'project.overview.tooltips.bookmarks' | translate" |
| 91 | + > |
| 92 | + @if (!isBookmarksLoading() && !isBookmarksSubmitting()) { |
| 93 | + <i class="text-2xl" [ngClass]="isBookmarked() ? 'fas fa-bookmark' : 'far fa-bookmark'"></i> |
| 94 | + } |
| 95 | + </p-button> |
| 96 | + } |
| 97 | + |
| 98 | + @if (resource.isPublic && !hasViewOnly()) { |
| 99 | + <p-button |
| 100 | + class="flex" |
| 101 | + (onClick)="socialsActionMenu.toggle($event)" |
| 102 | + [pTooltip]="'project.overview.tooltips.share' | translate" |
| 103 | + tooltipPosition="bottom" |
| 104 | + [ariaLabel]="'project.overview.tooltips.share' | translate" |
| 105 | + > |
| 106 | + <span class="font-bold">{{ socialsActionItems().length }}</span> |
| 107 | + <i class="fas fa-share-nodes text-2xl"></i> |
| 108 | + <p-menu appendTo="body" #socialsActionMenu [model]="socialsActionItems()" popup> |
| 109 | + <ng-template #item let-item> |
| 110 | + <a class="p-menu-item-link" [href]="item.url" target="_blank" rel="noopener noreferrer"> |
| 111 | + <div class="social-link flex align-items-center justify-content-center"> |
| 112 | + <osf-icon [iconClass]="`${item.icon} fa-sm`"></osf-icon> |
| 113 | + </div> |
| 114 | + {{ item.label | translate }} |
| 115 | + </a> |
| 116 | + </ng-template> |
| 117 | + </p-menu> |
| 118 | + </p-button> |
| 119 | + } |
| 120 | + </div> |
119 | 121 | </div>
|
120 | 122 | </div>
|
121 |
| - </div> |
| 123 | + } |
122 | 124 | </div>
|
123 | 125 | }
|
0 commit comments