diff --git a/src/app/features/deposit/components/containers/deposit-table-contributor/deposit-table-contributor.container.html b/src/app/features/deposit/components/containers/deposit-table-contributor/deposit-table-contributor.container.html index 7d2f3f67138221cb0590eb51dd288688b7f21756..318bd45052c021259fadb6a15430274a69464a75 100644 --- a/src/app/features/deposit/components/containers/deposit-table-contributor/deposit-table-contributor.container.html +++ b/src/app/features/deposit/components/containers/deposit-table-contributor/deposit-table-contributor.container.html @@ -141,17 +141,32 @@ </td> <td class="role-cell"> <ng-template [ngIf]="mode === modeEnum.contributors && !isCollaboration(f)"> - <mat-radio-group *ngIf="formValidationHelper.getFormControl(f, formDefinition.role) as fd" - [formControl]="fd" - class="radio-vertical" - color="primary" + <ng-template [ngIf]="contributorRoleDisplayMode === 'dropdown'" + [ngIfElse]="radioDisplay" > - <mat-radio-button *ngFor="let role of (listContributorRoleObs | async)" - [value]="role.value" + <mat-form-field *ngIf="formValidationHelper.getFormControl(f, formDefinition.role) as fd"> + <mat-select [formControl]="fd"> + <mat-option *ngFor="let role of (listContributorRoleObs | async)" + [value]="role.value" + > + {{role.labels | backtranslate}} + </mat-option> + </mat-select> + </mat-form-field> + </ng-template> + <ng-template #radioDisplay> + <mat-radio-group *ngIf="formValidationHelper.getFormControl(f, formDefinition.role) as fd" + [formControl]="fd" + class="radio-vertical" + color="primary" > - {{role.labels | backtranslate}} - </mat-radio-button> - </mat-radio-group> + <mat-radio-button *ngFor="let role of (listContributorRoleObs | async)" + [value]="role.value" + > + {{role.labels | backtranslate}} + </mat-radio-button> + </mat-radio-group> + </ng-template> </ng-template> </td> @@ -302,7 +317,7 @@ </li> <li *ngIf="checkAtLeastOneAuthor && !atLeastTheRole(roleContributorEnum.author)"> - {{labelTranslateEnum.atLeastOneAuthorMustBeDefined | translate}} + {{labelTranslateEnum.atLeastOneAuthorMustBeDefined | translate}} </li> </ul> diff --git a/src/app/features/deposit/components/containers/deposit-table-contributor/deposit-table-contributor.container.ts b/src/app/features/deposit/components/containers/deposit-table-contributor/deposit-table-contributor.container.ts index fff40fe7dac3e05b96000b28c5ad18fbd3d357d2..df4749f11cfdde5dae324aae05f15499647ed22b 100644 --- a/src/app/features/deposit/components/containers/deposit-table-contributor/deposit-table-contributor.container.ts +++ b/src/app/features/deposit/components/containers/deposit-table-contributor/deposit-table-contributor.container.ts @@ -28,6 +28,7 @@ import { } from "@app/features/deposit/models/deposit-form-definition.model"; import {AppSystemPropertyState} from "@app/stores/system-property/app-system-property.state"; import {Enums} from "@enums"; +import {environment} from "@environments/environment"; import { Contributor, PublicationSubtypeContributorRoleDTO, @@ -94,6 +95,8 @@ export class DepositTableContributorContainer extends SharedAbstractContainer im readonly LIMIT_CONTRIBUTOR_TO_DISPLAY: number = LIMIT_CONTRIBUTOR_TO_DISPLAY; + contributorRoleDisplayMode: "radio" | "dropdown" = environment.contributorRoleDisplayMode; + searchContributorInfosMap: Map<string, SearchContributorInfos>; displayLastNameFirstName: boolean = true; diff --git a/src/environments/environment.defaults.model.ts b/src/environments/environment.defaults.model.ts index 34345fb67b0e0d21ac824781ca118aa3e17e3596..cbc1cdfa903da398a1df19c20fed3fb56f51a911 100644 --- a/src/environments/environment.defaults.model.ts +++ b/src/environments/environment.defaults.model.ts @@ -107,4 +107,5 @@ export interface AouEnvironment extends DefaultSolidifyEnvironment { depositRequestToValidatorAtLeastOnPdfFile: boolean; depositRequestToDepositorAtLeastOnPdfFileForSendToValidation: boolean; keywordCharLimitForWarning: number; + contributorRoleDisplayMode: "radio" | "dropdown"; } diff --git a/src/environments/environment.defaults.ts b/src/environments/environment.defaults.ts index 7a1e4a4eaa4ae8f8c5215c6446b75dc56720b4d9..e7eddf36cdeab46162913d467b96b3459bbef95f 100644 --- a/src/environments/environment.defaults.ts +++ b/src/environments/environment.defaults.ts @@ -174,6 +174,7 @@ export const defaultEnvironment: AouEnvironment = { depositRequestToValidatorAtLeastOnPdfFile: true, depositRequestToDepositorAtLeastOnPdfFileForSendToValidation: true, keywordCharLimitForWarning: 100, + contributorRoleDisplayMode: "dropdown", }; /*