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 { VocabularyEntry } from '../../../../../../core/submission/vocabularies/models/vocabulary-entry.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 {
|
||||
id: string;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
@if (submissionCcLicenses) {
|
||||
<ng-container *ngIf="selectedCcLicense">
|
||||
<div class="mb-4 ccLicense-select">
|
||||
<div ngbDropdown>
|
||||
<input id="cc-license-dropdown"
|
||||
@@ -18,22 +18,23 @@
|
||||
[infiniteScrollUpDistance]="1.5"
|
||||
[fromRoot]="true"
|
||||
[scrollWindow]="false">
|
||||
|
||||
@if(submissionCcLicenses?.length === 0) {
|
||||
<ng-container *ngIf="submissionCcLicenses?.length === 0; else licensesList">
|
||||
<button class="dropdown-item disabled">
|
||||
{{ 'submission.sections.ccLicense.none' | translate }}
|
||||
</button>
|
||||
} @else {
|
||||
@for(license of submissionCcLicenses; track license.id) {
|
||||
</ng-container>
|
||||
</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>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</ng-container>
|
||||
</ng-template>
|
||||
|
||||
<ng-container *ngIf="getSelectedCcLicense()">
|
||||
|
||||
|
Reference in New Issue
Block a user