<div class="row">
  <div class="col-12">
    <button class="btn btn-primary" routerLink="/web-template/new">New Web Template</button>
  </div>
</div>

<div class="row mt-2">
  <div class="col-12">
    <table class="table table-hover">
      <thead class="thead-dark">
        <tr>
          <th scope="col">Name</th>
          <th scope="col">Type</th>
          <th scope="col">Create Date</th>
        </tr>
      </thead>
      <tbody>
        <ng-container *ngFor="let webTemplate of webTemplateService.webTemplates">
          <tr routerLink="/web-template/{{ webTemplate.id }}/edit">
            <td>{{ webTemplate.name }}</td>
            <td>{{ webTemplate.templateType }}</td>
            <td>{{ webTemplate.createDate | date:'dd-MMM-yyyy'}}</td>
          </tr>
        </ng-container>
        <p *ngIf="webTemplateService.webTemplates.length === 0">No web template created yet. Create templates by clicking <a routerLink="/web-template/new">here</a></p>
      </tbody>
    </table>
  </div>
</div>
