Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/app/features/metadata/metadata.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ export class MetadataComponent implements OnInit {
this.customDialogService
.open(ContributorsDialogComponent, {
header: this.translateService.instant('project.metadata.contributors.editContributors'),
width: '600px',
data: {
resourceId: this.resourceId,
resourceType: this.resourceType(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ <h2 class="mb-2">{{ 'project.overview.metadata.contributors' | translate }}</h2>
<div class="flex justify-content-end mt-3">
@if (hasChanges) {
<div class="flex gap-2 mr-4">
<p-button (click)="cancel()" severity="info" [label]="'common.buttons.cancel' | translate" />
<p-button (click)="save()" [label]="'common.buttons.save' | translate" />
<p-button (onClick)="cancel()" severity="info" [label]="'common.buttons.cancel' | translate" />
<p-button (onClick)="save()" [label]="'common.buttons.save' | translate" />
</div>
}
<p-button [label]="'registries.metadata.addContributors' | translate" (click)="openAddContributorDialog()" />
<p-button [label]="'registries.metadata.addContributors' | translate" (onClick)="openAddContributorDialog()" />
</div>
</p-card>
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@
>
<ng-template #header>
<tr>
<th></th>
<th>
@if (deactivatedContributors()) {
<osf-info-icon [tooltipText]="'project.contributors.reorderDeactivateTooltip'"></osf-info-icon>
}
</th>
<th>{{ 'project.contributors.table.headers.name' | translate }}</th>
<th>
<div class="flex align-items-center">
Expand Down Expand Up @@ -62,9 +66,11 @@
@if (contributor.id) {
<tr [pReorderableRow]="index" class="select-none">
<td>
<div pReorderableRowHandle>
<osf-icon [iconClass]="'fas fa-bars'"></osf-icon>
</div>
@if (!deactivatedContributors()) {
<div pReorderableRowHandle>
<osf-icon [iconClass]="'fas fa-bars'"></osf-icon>
</div>
}
</td>

<td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { ContributorModel, SelectOption, TableParameters } from '@osf/shared/mod
import { CustomDialogService } from '@osf/shared/services';

import { IconComponent } from '../../icon/icon.component';
import { InfoIconComponent } from '../../info-icon/info-icon.component';

@Component({
selector: 'osf-contributors-table',
Expand All @@ -31,6 +32,7 @@ import { IconComponent } from '../../icon/icon.component';
Button,
SelectComponent,
IconComponent,
InfoIconComponent,
],
templateUrl: './contributors-table.component.html',
styleUrl: './contributors-table.component.scss',
Expand Down Expand Up @@ -60,6 +62,8 @@ export class ContributorsTableComponent {

isProject = computed(() => this.resourceType() === ResourceType.Project);

deactivatedContributors = computed(() => this.contributors().some((contributor) => contributor.deactivated));

canRemoveContributor = computed(() => {
const contributors = this.contributors();
const currentUserId = this.currentUserId();
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,7 @@
"searchRegistrationPlaceholder": "Search Registration Contributors",
"permissionFilter": "Filter by permission",
"bibliographyFilter": "Bibliography",
"reorderDeactivateTooltip": "Remove deactivated contributors in order to enable reordering.",
"permissions": {
"administrator": "Administrator",
"readAndWrite": "Read + Write",
Expand Down
Loading