blob: a0ed34d518eb401e08be6bfda7ac9133d232f2c8 [file] [log] [blame]
<!-- create new child dialog -->
<div *ngIf="node['creatingChild']" id="{{node['path']}}_createChildDialog"
class="node_edit" [class.dialog]="node['schemaChildren']"
treeScrollTo [node]="node">
<ng-container *ngIf="node['schemaChildren'].length; else nothingToCreate">
<tree-indent [node]="node" [indentation]="indentation" [type]="'create'"></tree-indent>
<select (change)="creatingDialogSelect(node, $event.target.value, $event.currentTarget)">
<option disabled selected value="-1" style="display: none">&nbsp;</option>
<ng-container *ngFor="let schema of node['schemaChildren']; let i='index'">
<option value="{{i}}">{{modsService.schemaName(node['info'], schema)}}</option>
</ng-container>
</select>
<!-- <pre>{{node['schemaChildren'] | json}}</pre> -->
</ng-container>
<ng-template #nothingToCreate>
<div class="msg-failure msg-rounded">
<span class="msg-close" (click)="closeCreatingDialog(node);">x</span>There is no element to create at {{node['path']}}.
</div>
</ng-template>
</div>