blob: 963fc23bd5c9ad2e4c2b285772a70247b40ac7d0 [file] [log] [blame]
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<fims-layout-card-over title="{{'Custom fields' | translate }}" [navigateBackTo]="['../../../']">
<fims-layout-card-over-header-menu *ngIf="(catalog$ | async) as catalog">
<button mat-icon-button (click)="deleteCatalog(catalog)" title="{{'Delete this catalog' | translate}}">
<mat-icon>delete</mat-icon>
</button>
</fims-layout-card-over-header-menu>
<ng-container *ngIf="(catalog$ | async) as catalog; else elseBlock">
<div class="mat-content inset" flex>
<div layout="row">
<mat-list>
<mat-list-item>
<h3 matLine translate>Name</h3>
<p matLine>{{catalog.name}}</p>
</mat-list-item>
<mat-list-item>
<h3 matLine translate>Description</h3>
<p matLine>{{catalog.description}}</p>
</mat-list-item>
<mat-list-item>
<h3 matLine translate>Created by</h3>
<p matLine>{{catalog.createdBy}} - {{catalog.createdOn | date:'medium'}}</p>
</mat-list-item>
<mat-list-item>
<h3 matLine translate>Last modified by</h3>
<p matLine>{{catalog.lastModifiedBy}} - {{catalog.lastModifiedOn | date:'medium'}}</p>
</mat-list-item>
</mat-list>
</div>
<fims-data-table flex
[columns]="columns"
[data]="fieldData$ | async"
(onActionCellClick)="rowSelect($event)">
</fims-data-table>
</div>
</ng-container>
<ng-template #elseBlock>
<td-message label="{{'No custom fields found' | translate }}"
color="warn" icon="error">
<button td-message-actions mat-button [routerLink]="['edit']"
*hasPermission="{ id: 'catalog_catalogs', accessLevel: 'CHANGE'}" translate>CREATE CUSTOM FIELDS
</button>
</td-message>
</ng-template>
</fims-layout-card-over>