2017-12-23 15:17:29 -05:00
|
|
|
<div *ngIf="widgetComponent.isLoading">
|
2017-12-23 01:30:42 -05:00
|
|
|
<my-spinner></my-spinner>
|
|
|
|
</div>
|
2017-12-23 15:17:29 -05:00
|
|
|
<div *ngIf="!widgetComponent.isLoading">
|
2017-12-23 01:30:42 -05:00
|
|
|
<my-ibox [isCollapsible]="true" [defaultCollapsed]="widgetComponent.defaultExpandedWidgetId">
|
|
|
|
<h5 class="my-ibox-title">
|
2020-10-23 07:30:20 -04:00
|
|
|
<i class="far fa-plus-square"></i> {{ widgetComponent.defaultName | translate }} {{'Add' | translate}}
|
2017-12-23 01:30:42 -05:00
|
|
|
</h5>
|
|
|
|
<div class="my-ibox-content">
|
|
|
|
<form (submit)="widgetComponent.addWidget()" novalidate name="addForm">
|
2019-07-11 00:17:16 -04:00
|
|
|
<ng-container
|
|
|
|
*ngTemplateOutlet="widgetParamsTemplate;context:{widget:widgetComponent.newWidget}"></ng-container>
|
2017-12-23 01:30:42 -05:00
|
|
|
|
|
|
|
<div style="margin-top: 25px">
|
|
|
|
<button type="submit" class="btn btn-sm btn-success" [disabled]="widgetComponent.isUpdating">
|
2020-10-23 07:30:20 -04:00
|
|
|
<i class="fa fa-plus"></i> {{'Add Widget' | translate}}
|
2017-12-23 01:30:42 -05:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</my-ibox>
|
|
|
|
|
2019-07-11 00:17:16 -04:00
|
|
|
<my-ibox *ngFor="let widget of widgetComponent.widgets trackById" [isCollapsible]="true"
|
|
|
|
[defaultCollapsed]="widget.id !== widgetComponent.defaultExpandedWidgetId">
|
2017-12-23 01:30:42 -05:00
|
|
|
<h5 class="my-ibox-title">
|
2018-03-24 00:13:15 -04:00
|
|
|
<i class="fa fa-pencil-alt"></i> {{ widget.name || widget.url || widgetComponent.defaultName }}
|
2017-12-23 17:03:24 -05:00
|
|
|
<span *ngIf="widget.data.title">- {{ widget.data.title }}</span>
|
2017-12-23 01:30:42 -05:00
|
|
|
</h5>
|
|
|
|
<div class="my-ibox-content">
|
|
|
|
<form (submit)="widgetComponent.saveWidget(widget)" novalidate name="editForm">
|
|
|
|
<ng-container *ngTemplateOutlet="widgetParamsTemplate;context:{widget:widget}"></ng-container>
|
|
|
|
|
|
|
|
<div style="margin-top: 25px">
|
|
|
|
<button type="submit" class="btn btn-sm btn-primary" [disabled]="widgetComponent.isUpdating">
|
2020-10-23 07:30:20 -04:00
|
|
|
<i class="far fa-save"></i>{{'Save Widget' | translate}}
|
2017-12-23 01:30:42 -05:00
|
|
|
</button>
|
2020-10-23 07:30:20 -04:00
|
|
|
<button type="button" class="btn btn-sm ml-1 btn-outline-danger" [disabled]="widgetComponent.isUpdating"
|
2019-07-11 00:17:16 -04:00
|
|
|
(click)="widgetComponent.removeWidget(widget)">
|
2020-10-23 07:30:20 -04:00
|
|
|
<i class="far fa-trash-alt"></i>{{'Remove Widget' | translate}}
|
2017-12-23 01:30:42 -05:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</my-ibox>
|
2020-10-23 07:30:20 -04:00
|
|
|
</div>
|