FarmMapsLib/projects/common-map/src/fm-map/components/selected-item-temporal/selected-item-temporal.component.html
Mark van der Wal c0f689331e
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
Added parentitem title to geotiff, shape and temporal selected-item components.
2020-07-15 23:15:31 +02:00

46 lines
2.5 KiB
HTML

<div class="spacer"></div>
<div *ngIf="selectedItem();let item">
<div class="card border-0">
<div class="card-body">
<div class="mb-2"><a href="#" (click)="handleBackToList($event)" i18n>Back</a></div>
<div class="card menu-card">
<h2 *ngIf="parentItem">{{parentItem.name}}</h2>
<h1>{{item.name}}</h1>
</div>
<div class="legend-container" *ngIf="item?.data.layers;let layers">
<div class="card menu-card">
<h5>Date image: {{item.dataDate | date:'shortDate'}}</h5>
<div class="d-flex justify-content-between">
<div *ngIf="hasPrevious()">
<button type="button" class="btn btn-link p-0" (click)="handlePreviousTemporal($event)">
<i class="fa fa-arrow-circle-left" aria-hidden="true" i18n-title title="Previous"></i>&nbsp;{{ previousDate() | date:'shortDate'}}
</button>
</div>
<div *ngIf="hasNext()">
<button type="button" class="btn btn-link p-0" (click)="handleNextTemporal($event)">
{{ nextDate()| date:'shortDate' }}&nbsp;<i class="fa fa-arrow-circle-right" aria-hidden="true" i18n-title title="Next"></i>
</button>
</div>
</div>
</div>
<div class="card menu-card pt-2">
<div *ngIf="layers.length>1">
<select (change)="onLayerChanged($event.target.value)">
<option *ngFor="let l of layers;" [value]="l.index" [selected]="itemLayer.layerIndex == l.index">{{l.name}}</option>
</select>
</div>
<fm-map-layer-legend [showTitle]="layers.length == 1"
[layer]="layer(layers,itemLayer.layerIndex)" [histogramenabled]="true"></fm-map-layer-legend>
</div>
</div>
<div class="card menu-card">
<ul class="p-0 mt-2">
<li *ngIf="item.isEditable"><a href="#" class="mt-1 mr-1" (click)="handleOnEdit(item)"><i class="fa fa-pencil" aria-hidden="true" i18n-title title="Edit"></i>&nbsp;<span i18n>Edit</span></a></li>
<li *ngIf="itemTypeService.isLayer(item)"><a href="#" (click)="handleAddAsLayer(item,itemLayer.layerIndex)" class="mt-1 mr-1"><i class="fa fa-eye" aria-hidden="true" i18n-title title="Add as layer"></i>&nbsp;<span i18n>Add as overlay</span></a></li>
<li><a href="#" (click)="handleGoToChart(item)"><i class="fa fa-line-chart" aria-hidden="true" i18m-title title="Show chart"></i>&nbsp;<span i18n>Show chart</span></a></li>
</ul>
</div>
</div>
</div>
</div>