refs #1319. Default menu logic
testing/ogGui-multibranch/pipeline/head There was a failure building this commit
Details
testing/ogGui-multibranch/pipeline/head There was a failure building this commit
Details
parent
fd5f4b5f41
commit
e9baede635
|
@ -24,6 +24,13 @@
|
||||||
<mat-label>Comentarios</mat-label>
|
<mat-label>Comentarios</mat-label>
|
||||||
<input matInput formControlName="comments" name="comments">
|
<input matInput formControlName="comments" name="comments">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-checkbox
|
||||||
|
formControlName="isDefault"
|
||||||
|
class="example-margin"
|
||||||
|
>
|
||||||
|
{{ 'defaultMenuLabel' | translate }}
|
||||||
|
</mat-checkbox>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<!-- Iframe -->
|
<!-- Iframe -->
|
||||||
|
|
|
@ -31,6 +31,7 @@ export class CreateMenuComponent {
|
||||||
name: ['', Validators.required],
|
name: ['', Validators.required],
|
||||||
publicUrl: ['', Validators.required],
|
publicUrl: ['', Validators.required],
|
||||||
resolution: ['', Validators.required],
|
resolution: ['', Validators.required],
|
||||||
|
isDefault: [false],
|
||||||
comments: [''],
|
comments: [''],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -58,6 +59,7 @@ export class CreateMenuComponent {
|
||||||
publicUrl: [response.publicUrl, Validators.required],
|
publicUrl: [response.publicUrl, Validators.required],
|
||||||
resolution: [response.resolution, Validators.required],
|
resolution: [response.resolution, Validators.required],
|
||||||
comments: [response.comments],
|
comments: [response.comments],
|
||||||
|
isDefault: [response.isDefault],
|
||||||
});
|
});
|
||||||
this.menuId = response['@id'];
|
this.menuId = response['@id'];
|
||||||
this.updateSafeUrl()
|
this.updateSafeUrl()
|
||||||
|
@ -74,6 +76,7 @@ export class CreateMenuComponent {
|
||||||
publicUrl: this.menuForm.value.publicUrl,
|
publicUrl: this.menuForm.value.publicUrl,
|
||||||
resolution: this.menuForm.value.resolution,
|
resolution: this.menuForm.value.resolution,
|
||||||
comments: this.menuForm.value.comments,
|
comments: this.menuForm.value.comments,
|
||||||
|
isDefault: this.menuForm.value.isDefault,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.menuId) {
|
if (this.menuId) {
|
||||||
|
|
|
@ -22,9 +22,14 @@
|
||||||
<ng-container *ngFor="let column of columns" [matColumnDef]="column.columnDef">
|
<ng-container *ngFor="let column of columns" [matColumnDef]="column.columnDef">
|
||||||
<th mat-header-cell *matHeaderCellDef> {{ column.header }} </th>
|
<th mat-header-cell *matHeaderCellDef> {{ column.header }} </th>
|
||||||
<td mat-cell *matCellDef="let menu" >
|
<td mat-cell *matCellDef="let menu" >
|
||||||
<ng-container>
|
<ng-container *ngIf="column.columnDef !== 'isDefault'">
|
||||||
{{ column.cell(menu) }}
|
{{ column.cell(menu) }}
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
<ng-container *ngIf="column.columnDef === 'isDefault'">
|
||||||
|
<mat-icon [color]="menu[column.columnDef] ? 'primary' : 'warn'">
|
||||||
|
{{ menu[column.columnDef] ? 'check_circle' : 'cancel' }}
|
||||||
|
</mat-icon>
|
||||||
|
</ng-container>
|
||||||
</td>
|
</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,11 @@ export class MenusComponent {
|
||||||
header: 'Url pública',
|
header: 'Url pública',
|
||||||
cell: (repository: any) => `${this.baseUrl}/menu/${repository.publicUrl}`
|
cell: (repository: any) => `${this.baseUrl}/menu/${repository.publicUrl}`
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
columnDef: 'isDefault',
|
||||||
|
header: 'Por defecto',
|
||||||
|
cell: (repository: any) => `${repository.isDefault}`
|
||||||
|
},
|
||||||
{
|
{
|
||||||
columnDef: 'resolution',
|
columnDef: 'resolution',
|
||||||
header: 'Resolución',
|
header: 'Resolución',
|
||||||
|
|
|
@ -448,5 +448,6 @@
|
||||||
"parent": "Parent",
|
"parent": "Parent",
|
||||||
"adminUsersTitle": "Manage users",
|
"adminUsersTitle": "Manage users",
|
||||||
"filtersPanelStepText": "Use these filters to search or load configurations.",
|
"filtersPanelStepText": "Use these filters to search or load configurations.",
|
||||||
"organizationalUnitsStepText": "List of Organizational Units. Click on one to view details."
|
"organizationalUnitsStepText": "List of Organizational Units. Click on one to view details.",
|
||||||
|
"defaultMenuLabel": "Main menu"
|
||||||
}
|
}
|
||||||
|
|
|
@ -450,5 +450,6 @@
|
||||||
"parent": "Padre",
|
"parent": "Padre",
|
||||||
"adminUsersTitle": "Administrar usuarios",
|
"adminUsersTitle": "Administrar usuarios",
|
||||||
"filtersPanelStepText": "Utiliza estos filtros para buscar o cargar configuraciones.",
|
"filtersPanelStepText": "Utiliza estos filtros para buscar o cargar configuraciones.",
|
||||||
"organizationalUnitsStepText": "Lista de Unidades Organizacionales. Haz clic en una para ver detalles."
|
"organizationalUnitsStepText": "Lista de Unidades Organizacionales. Haz clic en una para ver detalles.",
|
||||||
|
"defaultMenuLabel": "Menú por defecto"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue