Advertisement
Ahlushko

Untitled

Jun 25th, 2020
1,639
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 3.29 KB | None | 0 0
  1. <div class="d-flex flex-column flex-md-row align-items-center p-3 px-md-4 mb-3 bg-white border-bottom shadow-sm">
  2.     <h5 class="my-0 mr-md-auto font-weight-normal">Бібліотека</h5>
  3.     <a class="btn btn-outline-primary" (click)="create.add = true">Додати книгу</a>
  4.     <a class="btn btn-outline-primary" >Видалити всі книги</a>
  5. </div>
  6. <table>
  7.     <thead>
  8.         <tr>
  9.             <td><select [(ngModel)]="option.selected.surname" (change)="sort('surname')" class="form-control">
  10.                 <option value="" selected="">Виберіть автора...</option>
  11.                 <option *ngFor="let option of option.surname" [value]="option">{{option}}</option>
  12.             </select></td>
  13.             <td><select [(ngModel)]="option.selected.title" (change)="sort('title')" class="form-control">
  14.                 <option value="" selected="">Виберіть назву книги...</option>
  15.                 <option *ngFor="let option of option.title" [value]="option">{{option}}</option>
  16.             </select></td>
  17.             <td><select [(ngModel)]="option.selected.year" (change)="sort('year')" class="form-control">
  18.                 <option value="" selected="">Виберіть рік видання...</option>
  19.                 <option *ngFor="let option of option.year" [value]="option">{{option}}</option>
  20.             </select></td>
  21.             <td><select [(ngModel)]="option.selected.minYear" (change)="sort('minYear')" class="form-control">
  22.                 <option value="" selected="">Виберіть мінімальний рік видання...</option>
  23.                 <option *ngFor="let option of option.year" [value]="option">{{option}}</option>
  24.             </select></td>
  25.         </tr>
  26.     </thead>
  27. </table>
  28. <table class="table table-striped">
  29.     <thead>
  30.         <tr *ngIf="create.add">
  31.             <td><button class="btn btn-outline-primary" (click)="addBook()">+</button></td>
  32.             <td><input [(ngModel)]="create.pib" class="form-control" type="text" placeholder="Автор"></td>
  33.             <td><input [(ngModel)]="create.title" class="form-control" type="text" placeholder="Назва книги"></td>
  34.             <td><input [(ngModel)]="create.year"  class="form-control" type="text" placeholder="Рік видання"></td>
  35.         </tr>
  36.         <tr>
  37.             <th scope="col"></th>
  38.             <th scope="col">Прізвище</th>
  39.             <th scope="col">Ініціали</th>
  40.             <th scope="col">Назва книги</th>
  41.             <th scope="col">Рік видання</th>
  42.             <th></th>
  43.         </tr>
  44.     </thead>
  45.     <tbody>
  46.         <tr *ngFor="let book of books; let i = index">
  47.             <th scope="row">{{i+1}}</th>
  48.             <td class="myTD" *ngFor="let prop of properties">
  49.                 <input (change)="lab.update(this.edit[book._id])" [(ngModel)]="edit[book._id][prop]" class="myform-control" type="text" [placeholder]="book[prop]">
  50.             </td>
  51.             <td class="myTD"><svg class="bi bi-trash2-fill btn btn-outline-primary" width="47px" (click)="lab.delete(book)" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
  52.                 <path d="M2.037 3.225l1.684 10.104A2 2 0 0 0 5.694 15h4.612a2 2 0 0 0 1.973-1.671l1.684-10.104C13.627 4.224 11.085 5 8 5c-3.086 0-5.627-.776-5.963-1.775z"/>
  53.                 <path fill-rule="evenodd" d="M12.9 3c-.18-.14-.497-.307-.974-.466C10.967 2.214 9.58 2 8 2s-2.968.215-3.926.534c-.477.16-.795.327-.975.466.18.14.498.307.975.466C5.032 3.786 6.42 4 8 4s2.967-.215 3.926-.534c.477-.16.795-.327.975-.466zM8 5c3.314 0 6-.895 6-2s-2.686-2-6-2-6 .895-6 2 2.686 2 6 2z"/>
  54.             </svg></td>
  55.         </tr>
  56.     </tbody>
  57. </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement