|
1 | 1 | <div> |
2 | | - <h2 id="page-heading"> |
| 2 | + <h1 id="page-heading"> |
3 | 3 | <span jhiTranslate="bonGatewayApp.farm.cow.dam-details.title" |
4 | | - [translateValues]="{ earTagId: dam?.earTagId, familyname: dam?.name }">Dam X</span> |
5 | | - </h2> |
| 4 | + [translateValues]="{ earTagId: dam?.earTagId, familyname: dam?.name! | titlecase }">Dam X</span> |
| 5 | + </h1> |
6 | 6 |
|
7 | | - <div class="clearfix" *ngIf="loading$ | async"> |
8 | | - <div class="spinner-border spinner-border-sm float-right" role="status"> |
9 | | - <span class="sr-only">Loading...</span> |
10 | | - </div> |
11 | | - </div> |
| 7 | + <div> |
| 8 | + <div class="clearfix" *ngIf="loading$ | async"> |
| 9 | + <div class="spinner-border spinner-border-sm float-right" role="status"> |
| 10 | + <span class="sr-only">Loading...</span> |
| 11 | + </div> |
| 12 | + </div> |
| 13 | + <jhi-alert-error></jhi-alert-error> |
| 14 | + <jhi-alert></jhi-alert> |
| 15 | + </div> |
12 | 16 |
|
13 | | - <jhi-alert-error></jhi-alert-error> |
| 17 | + <article *ngIf="article$ | async as article" class="dam-article-container"> |
| 18 | + <section *ngFor="let section of article.sections" class="dam-section"> |
| 19 | + <h4 *ngIf="section?.title">{{ section?.title }}</h4> |
| 20 | + <p *ngIf="section?.ingress">{{ section?.ingress }}</p> |
| 21 | + <p *ngIf="section?.body">{{ section?.body }}</p> |
14 | 22 |
|
15 | | - <jhi-alert></jhi-alert> |
| 23 | + <figure *ngIf="section?.imageContentType" class="figure dam-section-figure"> |
| 24 | + <img [src]="'data:' + section?.imageContentType + ';base64,' + section?.image" alt="" |
| 25 | + class="figure-img img-fluid"> |
| 26 | + <figcaption *ngIf="section?.caption" class="figure-caption">{{section?.caption}}</figcaption> |
| 27 | + </figure> |
| 28 | + </section> |
| 29 | + </article> |
16 | 30 |
|
17 | | - <div *ngIf="dam" class="cow-container" |
18 | | - [ngClass]="{ |
19 | | - 'is-role-anonymous': dam?.visibility == 'ROLE_ANONYMOUS', |
20 | | - 'is-role-user': dam?.visibility == 'ROLE_USER', |
21 | | - 'is-role-admin': dam?.visibility == 'ROLE_ADMIN' |
22 | | - }"> |
23 | | - <p>BORN: {{ dam!.birthDate | date:'yyyy-MM-dd' }}</p> |
24 | | - <p>W0: {{ dam!.weight0 }} - W200: {{ dam!.weight200 }} - W365: {{ dam!.weight365 }}</p> |
| 31 | + <div class="row"> |
| 32 | + <div class="col-lg-3"> |
| 33 | + <div *ngIf="dam" class="dam-container" [jhiBonVisibilityClass]="dam?.visibility"> |
| 34 | + <div class="dam-card card"> |
| 35 | + <div class="card-header"> |
| 36 | + <span jhiTranslate="bonGatewayApp.farm.cow.dam-details.dam-card.header">Data</span> |
| 37 | + </div> |
| 38 | + <div class="card-body"> |
| 39 | + <p> |
| 40 | + <span jhiTranslate="bonGatewayApp.farm.cow.dam-details.dam-card.lineage">Lineage</span> |
| 41 | + <span>:</span> |
| 42 | + <a [routerLink]="['/farm', 'cow', 'linage', dam?.linageId]">{{ dam?.linageId }} {{ dam?.linageName! | titlecase }}</a> |
| 43 | + </p> |
| 44 | + <p> |
| 45 | + <span jhiTranslate="bonGatewayApp.farm.cow.dam-details.dam-card.born">BORN</span> |
| 46 | + <span>:</span> |
| 47 | + <span>{{ dam!.birthDate | date:'yyyy-MM-dd' }}</span> |
| 48 | + </p> |
| 49 | + <p> |
| 50 | + <span jhiTranslate="bonGatewayApp.farm.cow.dam-details.dam-card.w0">WO</span> |
| 51 | + <span>:</span> |
| 52 | + <span>{{ dam!.weight0 }}</span> |
| 53 | + <span>kg</span> |
| 54 | + </p> |
| 55 | + <p> |
| 56 | + <span jhiTranslate="bonGatewayApp.farm.cow.dam-details.dam-card.w200">W200</span> |
| 57 | + <span>:</span> |
| 58 | + <span>{{ dam!.weight200 }}</span> |
| 59 | + <span>kg</span> |
| 60 | + </p> |
| 61 | + <p> |
| 62 | + <span jhiTranslate="bonGatewayApp.farm.cow.dam-details.dam-card.w365">W365</span> |
| 63 | + <span>:</span> |
| 64 | + <span>{{ dam!.weight365 }}</span> |
| 65 | + <span>kg</span> |
| 66 | + </p> |
25 | 67 |
|
26 | | - <p *ngIf="matri$ | async as matri"> |
27 | | - <span>MATRI: </span> |
28 | | - <a *ngIf="matri; else noMatri" |
29 | | - [title]="'Matri' + matri?.earTagId" |
30 | | - [routerLink]="['/farm', 'cow', 'dam', matri?.earTagId]">{{ matri?.earTagId }} {{ matri?.name }}</a> |
31 | | - <ng-template #noMatri>{{ dam?.matriId }}</ng-template> |
32 | | - </p> |
33 | | - |
34 | | - <p *ngIf="patri$ | async as patri"> |
35 | | - <span>PATRI: </span> |
36 | | - <a *ngIf="patri; else noPatri" |
37 | | - [title]="'Patri' + patri?.earTagId" |
38 | | - [routerLink]="['/farm', 'cow', 'sire', patri?.earTagId]">{{ patri?.earTagId }} {{ patri?.name }}</a> |
39 | | - <ng-template #noPatri>{{ dam?.patriId }}</ng-template> |
40 | | - </p> |
41 | | - </div> |
42 | | - |
43 | | - |
44 | | - <article *ngIf="article$ | async as article" class="dam-article-container"> |
45 | | - <section *ngFor="let section of article.sections" class="dam-section"> |
46 | | - <h4 *ngIf="section?.title">{{ section?.title }}</h4> |
47 | | - <p *ngIf="section?.ingress">{{ section?.ingress }}</p> |
48 | | - <p *ngIf="section?.body">{{ section?.body }}</p> |
49 | | - |
50 | | - <figure *ngIf="section?.imageContentType" class="figure dam-section-figure"> |
51 | | - <img [src]="'data:' + section?.imageContentType + ';base64,' + section?.image" alt="" class="figure-img img-fluid"> |
52 | | - <figcaption *ngIf="section?.caption" class="figure-caption">{{section?.caption}}</figcaption> |
53 | | - </figure> |
54 | | - </section> |
55 | | - </article> |
56 | | - |
57 | | - <h3>Pictures</h3> |
58 | | - |
59 | | - <div *ngFor="let pic of pictures$ | async" class="dam-item p-2"> |
60 | | - <figure class="dam-figure figure" [jhiBonVisibilityClass]="pic?.visibility"> |
61 | | - <img [jhiCowPicture]="pic" |
62 | | - sizes="(min-width: 768px) 50vw, 100vw" |
63 | | - alt="{{ pic?.caption }}" |
64 | | - class="img-fluid" /> |
65 | | - </figure> |
66 | | - </div> |
| 68 | + <p *ngIf="matri$ | async as matri"> |
| 69 | + <span jhiTranslate="bonGatewayApp.farm.cow.dam-details.dam-card.matri">MATRI</span> |
| 70 | + <span>:</span> |
| 71 | + <a *ngIf="matri; else noMatri" |
| 72 | + [title]="'Matri ' + matri?.earTagId" |
| 73 | + [routerLink]="['/farm', 'cow', 'dam', matri?.earTagId]">{{ matri?.earTagId }} {{ matri?.name! | titlecase }}</a> |
| 74 | + <ng-template #noMatri>{{ dam?.matriId }}</ng-template> |
| 75 | + </p> |
67 | 76 |
|
| 77 | + <p *ngIf="patri$ | async as patri"> |
| 78 | + <span jhiTranslate="bonGatewayApp.farm.cow.dam-details.dam-card.patri">PATRI</span> |
| 79 | + <span>:</span> |
| 80 | + <a *ngIf="patri; else noPatri" |
| 81 | + [title]="'Patri ' + patri?.earTagId" |
| 82 | + [routerLink]="['/farm', 'cow', 'sire', patri?.earTagId]">{{ patri?.earTagId }} {{ patri?.name! | titlecase }}</a> |
| 83 | + <ng-template #noPatri>{{ dam?.patriId }}</ng-template> |
| 84 | + </p> |
| 85 | + </div> |
| 86 | + </div> |
| 87 | + </div> |
| 88 | + </div> |
| 89 | + <div class="col-lg-9"> |
| 90 | + <div *ngFor="let pic of pictures$ | async" class="dam-item" [jhiBonVisibilityClass]="pic?.visibility"> |
| 91 | + <figure class="dam-figure figure"> |
| 92 | + <img [jhiCowPicture]="pic" |
| 93 | + src="http://populated.by.directive" |
| 94 | + sizes="(min-width: 992px) 75vw, 100vw" |
| 95 | + alt="{{ pic?.caption }}" |
| 96 | + class="img-fluid dam-img"/> |
| 97 | + </figure> |
| 98 | + </div> |
| 99 | + </div> |
| 100 | + </div> |
68 | 101 | </div> |
0 commit comments