Browse Source

Fix content references.

pull/715/head
Sebastian Stehle 5 years ago
parent
commit
dc502bc188
  1. 8
      frontend/app/features/content/pages/content/content-page.component.html
  2. 3
      frontend/app/features/content/pages/content/references/content-references.component.ts
  3. 2
      frontend/app/features/content/shared/references/content-creator.component.html
  4. 4
      frontend/app/features/content/shared/references/content-selector.component.html

8
frontend/app/features/content/pages/content/content-page.component.html

@ -110,12 +110,16 @@
<ng-container [ngSwitch]="contentTab | async"> <ng-container [ngSwitch]="contentTab | async">
<ng-container *ngSwitchCase="'references'"> <ng-container *ngSwitchCase="'references'">
<sqx-content-references mode="references" <sqx-content-references mode="references"
[content]="content"> [content]="content"
[language]="language"
[languages]="languages">
</sqx-content-references> </sqx-content-references>
</ng-container> </ng-container>
<ng-container *ngSwitchCase="'referencing'"> <ng-container *ngSwitchCase="'referencing'">
<sqx-content-references mode="referencing" <sqx-content-references mode="referencing"
[content]="content"> [content]="content"
[language]="language"
[languages]="languages">
</sqx-content-references> </sqx-content-references>
</ng-container> </ng-container>
<ng-container *ngSwitchCase="'extension'"> <ng-container *ngSwitchCase="'extension'">

3
frontend/app/features/content/pages/content/references/content-references.component.ts

@ -24,6 +24,9 @@ export class ContentReferencesComponent implements OnChanges {
@Input() @Input()
public language: AppLanguageDto; public language: AppLanguageDto;
@Input()
public languages: ReadonlyArray<AppLanguageDto>;
@Input() @Input()
public mode: 'references' | 'referencing' = 'references'; public mode: 'references' | 'referencing' = 'references';

2
frontend/app/features/content/shared/references/content-creator.component.html

@ -2,7 +2,7 @@
<ng-container title> <ng-container title>
<div class="row"> <div class="row">
<div class="col-selector"> <div class="col-selector">
<select class="custom-select form-control-dark" [ngModel]="schema?.id" (ngModelChange)="selectSchema($event)"> <select class="custom-select form-control-dark" [ngModel]="schema" (ngModelChange)="selectSchema($event)">
<option *ngFor="let schema of schemas" [ngValue]="schema"> <option *ngFor="let schema of schemas" [ngValue]="schema">
{{ 'contents.referencesSelectSchema' | sqxTranslate: { schema: schema.displayName } }} {{ 'contents.referencesSelectSchema' | sqxTranslate: { schema: schema.displayName } }}
</option> </option>

4
frontend/app/features/content/shared/references/content-selector.component.html

@ -2,8 +2,8 @@
<ng-container title> <ng-container title>
<div class="row"> <div class="row">
<div class="col-selector"> <div class="col-selector">
<select class="custom-select form-control-dark" [ngModel]="schema?.id" (ngModelChange)="selectSchema($event)"> <select class="custom-select form-control-dark" [ngModel]="schema" (ngModelChange)="selectSchema($event)">
<option *ngFor="let schema of schemas" [ngValue]="schema.id"> <option *ngFor="let schema of schemas" [ngValue]="schema">
{{ 'contents.referencesSelectSchema' | sqxTranslate: { schema: schema.displayName } }} {{ 'contents.referencesSelectSchema' | sqxTranslate: { schema: schema.displayName } }}
</option> </option>
</select> </select>

Loading…
Cancel
Save