mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-14 05:23:06 +00:00
[DURACOM-304] remove control flow
This commit is contained in:
@@ -17,7 +17,7 @@ import { getFirstSucceededRemoteDataPayload } from '../../../../../../core/share
|
|||||||
import { PaginatedList } from '../../../../../../core/data/paginated-list.model';
|
import { PaginatedList } from '../../../../../../core/data/paginated-list.model';
|
||||||
import { VocabularyEntry } from '../../../../../../core/submission/vocabularies/models/vocabulary-entry.model';
|
import { VocabularyEntry } from '../../../../../../core/submission/vocabularies/models/vocabulary-entry.model';
|
||||||
import { PageInfo } from '../../../../../../core/shared/page-info.model';
|
import { PageInfo } from '../../../../../../core/shared/page-info.model';
|
||||||
import { EMPTY, expand, reduce } from "rxjs";
|
import { BehaviorSubject, EMPTY, expand, map, reduce, tap } from "rxjs";
|
||||||
|
|
||||||
export interface ListItem {
|
export interface ListItem {
|
||||||
id: string;
|
id: string;
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
@if (submissionCcLicenses) {
|
<ng-container *ngIf="selectedCcLicense">
|
||||||
<div class="mb-4 ccLicense-select">
|
<div class="mb-4 ccLicense-select">
|
||||||
<div ngbDropdown>
|
<div ngbDropdown>
|
||||||
<input id="cc-license-dropdown"
|
<input id="cc-license-dropdown"
|
||||||
@@ -18,22 +18,23 @@
|
|||||||
[infiniteScrollUpDistance]="1.5"
|
[infiniteScrollUpDistance]="1.5"
|
||||||
[fromRoot]="true"
|
[fromRoot]="true"
|
||||||
[scrollWindow]="false">
|
[scrollWindow]="false">
|
||||||
|
<ng-container *ngIf="submissionCcLicenses?.length === 0; else licensesList">
|
||||||
@if(submissionCcLicenses?.length === 0) {
|
|
||||||
<button class="dropdown-item disabled">
|
<button class="dropdown-item disabled">
|
||||||
{{ 'submission.sections.ccLicense.none' | translate }}
|
{{ 'submission.sections.ccLicense.none' | translate }}
|
||||||
</button>
|
</button>
|
||||||
} @else {
|
</ng-container>
|
||||||
@for(license of submissionCcLicenses; track license.id) {
|
|
||||||
<button class="dropdown-item" (click)="selectCcLicense(license)">
|
|
||||||
{{ license.name }}
|
|
||||||
</button>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</ng-container>
|
||||||
}
|
|
||||||
|
<ng-template #licensesList>
|
||||||
|
<ng-container *ngFor="let license of submissionCcLicenses">
|
||||||
|
<button class="dropdown-item" (click)="selectCcLicense(license)">
|
||||||
|
{{ license.name }}
|
||||||
|
</button>
|
||||||
|
</ng-container>
|
||||||
|
</ng-template>
|
||||||
|
|
||||||
<ng-container *ngIf="getSelectedCcLicense()">
|
<ng-container *ngIf="getSelectedCcLicense()">
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user