dnet-applications/frontends/dnet-is-application/src/app/resources/resources.component.html

30 lines
1.4 KiB
HTML

<h2>{{type.name}}</h2>
<button mat-stroked-button color="primary" (click)="openNewDialog()">create a new resource</button>
<mat-form-field appearance="fill" floatLabel="always" style="width: 100%; margin-top: 10px;">
<mat-label><b>Filter</b> (Total: {{(resources | searchFilter: searchText).length}})</mat-label>
<input matInput [(ngModel)]="searchText" placeholder="Filter..." autofocus />
</mat-form-field>
<mat-card *ngFor="let r of resources | searchFilter: searchText" style="margin-top: 10px;">
<mat-card-header>
<mat-card-title title="{{r.id}}">{{r.name}} <span class="badge-label badge-info" style="font-size: 0.7em;">{{type.contentType}}</span></mat-card-title>
</mat-card-header>
<mat-card-content>
<p>{{r.description}}</p>
<p class="muted small">
<b>Id:</b> {{r.id}}<br /> <b>Creation date:</b> {{r.creationDate}}<br /> <b>Modification date:</b> {{r.modificationDate}}
</p>
</mat-card-content>
<mat-card-actions>
<button mat-stroked-button color="primary" (click)="openMetadataDialog(r)">edit metadata</button>
<button mat-stroked-button color="primary" (click)="openContentDialog(r)">edit content</button>
<a href="./api/resources/{{r.id}}/content" mat-stroked-button color="link" target="_blank">raw content</a>
<button mat-stroked-button color="warn" (click)="deleteResource(r)">delete</button>
</mat-card-actions>
</mat-card>