Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AUS-4113 and AUS-4115 InfoPanel Adjustments #344

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/app/browsepanel/browsepanel.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<!-- Layers column -->
<div style="width:100%" class="container text-left">
<a *ngIf="!layerColumnHeader" style="font-weight: bold">Layers</a>
<a *ngIf="layerColumnHeader" ><span style="font-weight: bold;" class="truncate-layer">{{layerColumnHeader}} Layers</span></a>
<a *ngIf="layerColumnHeader"><span style="font-weight: bold;" class="truncate-layer">{{layerColumnHeader}} Layers</span></a>
<div class="row align-items-start" *ngFor="let layer of layerColumn">
<div class="col" (click)="selectLayer(layer)">
<a>
Expand All @@ -46,8 +46,9 @@
<p></p>
<!-- Information -->
<div *ngIf="selectedLayer">
<div *ngFor="let cswRecord of selectedLayer.cswRecords">
<div *ngFor="let cswRecord of selectedLayer.cswRecords; index as i">
<info-sub-panel *ngIf="selectedLayer" [cswRecord]="cswRecord" [layer]="selectedLayer" [expanded]=1></info-sub-panel>
<div *ngIf="i !== selectedLayer.cswRecords.length - 1" style="border-bottom:2px solid #ccc;margin-bottom:1rem;"></div>
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/app/menupanel/common/infopanel/infopanel.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ <h4><span class="text-primary">Metadata</span></h4>
<div class="card-header">
<h4 class="card-title">
<a class="accordion-link" data-toggle="collapse" href="#info-link{{i}}" (click)="cswRecord.expanded = !cswRecord.expanded" >
<i *ngIf='layerStatus.showInfoWarning(layer.id, cswRecord)' class="fa fa-warning text-warning"> </i>{{cswRecord.contactOrg !=='' && cswRecord.contactOrg !== null ? cswRecord.contactOrg : 'More Information'}}
</a>
<i *ngIf='layerStatus.showInfoWarning(layer.id, cswRecord)' class="fa fa-warning text-warning"> </i>{{cswRecord.contactOrg !=='' && cswRecord.contactOrg !== null ? cswRecord.contactOrg : 'More Information'}}
</a>
</h4>
</div>
<div id="info-link{{i}}" class="card-body card-collapse collapse">
Expand Down
75 changes: 37 additions & 38 deletions src/app/menupanel/common/infopanel/subpanel/subpanel.component.html
Original file line number Diff line number Diff line change
@@ -1,49 +1,48 @@
<!-- Title -->
<p><b>{{cswRecord.name}}</b></p>
<p><b style="font-size:large;">{{cswRecord.name}}</b></p>

<!-- Preview -->
<div *ngIf="wmsUrl!==undefined">
<b>WMS Preview: </b>
<!-- Place images one on top of the other -->
<div style="display: inline-block; position: relative; opacity: 50%;">
<img appImgLoading src="{{outlineUrl}}" (error)="onImgError($event)" height="200" width="200"/>
</div>
<div style="display: inline-block; position: relative; top: -200px; left: 100px; opacity: 50%;">
<img appImgLoading src="{{wmsUrl}}" (error)="onImgError($event)" height="200" width="200"/>
<b>WMS Preview:</b>
<div style="position:relative; height:200px; margin:0.5rem 0;">
<!-- Place images one on top of the other -->
<div style="display:inline-block; position:absolute; top:0px; left:50px; opacity: 50%;">
<img appImgLoading src="{{outlineUrl}}" (error)="onImgError($event)" height="200" width="200"/>
</div>
<div style="display:inline-block; position:absolute; top:0px; left:50px; opacity:50%;">
<img appImgLoading src="{{wmsUrl}}" (error)="onImgError($event)" height="200" width="200"/>
</div>
</div>
</div>

<!-- Move div up the page if there is a valid WMS Preview -->
<div style="display: inline-block; position: relative;" [ngStyle]="{'top': wmsUrl===undefined? '0px':'-200px'}">


<!-- Legend -->
<p *ngIf="legendUrl!==undefined">
<b>Legend: </b>
<img appImgLoading src="{{legendUrl}}" (error)="onImgError($event)" class="infopanel-legend"/>
</p>
<div style="display:inline-block; position:relative;">
<!-- Legend -->
<p *ngIf="legendUrl!==undefined">
<b>Legend: </b>
<img appImgLoading src="{{legendUrl}}" (error)="onImgError($event)" class="infopanel-legend"/>
</p>

<!-- Abstract -->
<p>{{cswRecord.description}}</p>
<!-- Abstract -->
<p>{{cswRecord.description}}</p>

<!-- Organisation etc. -->
<p><b>Contact org: </b>{{cswRecord.contactOrg}}</p>
<p *ngIf="cswRecord.funderOrg && cswRecord.funderOrg !== 'Unknown'"><b>Funder: </b>{{cswRecord.funderOrg}}</p>
<p *ngIf='cleanConstraints(cswRecord.constraints).length > 0'><b>Constraints: </b>{{cleanConstraints(cswRecord.constraints)}}</p>
<p *ngIf='selectConstraints(layer.capabilityRecords, cswRecord.accessConstraints).length > 0'><b>Access Constraints: </b>{{selectConstraints(layer.capabilityRecords, cswRecord.accessConstraints)}}</p>
<p *ngIf="cswRecord.recordInfoUrl && cswRecord.recordInfoUrl.length > 0"><b>Info URL: </b><a target="_blank" href="{{cswRecord.recordInfoUrl}}">Link to Geonetwork Record</a></p>
<div *ngFor="let onlineResource of cswRecord.onlineResources">
<p *ngIf="onlineResource.type==='DOI'">
<span class="label label-default"><b>DOI Name: </b></span> {{onlineResource.name}}<br>
<span class="label label-default"><b>Description: </b></span> {{onlineResource.description}}<br>
<span class="label label-default"><b>URL: </b></span><a target="_blank" href="{{onlineResource.url}}">{{onlineResource.url}}</a><br>
</p>
<p *ngIf="onlineResource.type!=='Unsupported' && onlineResource.type!=='DOI'">
<span *ngIf="isGetCapabilitiesType(onlineResource)" class="label label-default"><b>{{onlineResource.type}}: </b></span>
<a *ngIf="isGetCapabilitiesType(onlineResource)" target="_blank" href="{{ onlineResourceGetCapabilitiesUrl(onlineResource) }}">{{onlineResource.type}} GetCapabilities Info</a>
<span *ngIf="!isGetCapabilitiesType(onlineResource) && onlineResource.url" class="label label-default"><b>{{onlineResource.name.split('_').join(' ')}}: </b></span>
<a *ngIf="!isGetCapabilitiesType(onlineResource)" target="_blank" href="{{ removeProxy(onlineResource.url) }}">{{ removeProxy(onlineResource.url) }}</a>
</p>
</div>
<!-- Organisation etc. -->
<p><b>Contact org: </b>{{cswRecord.contactOrg}}</p>
<p *ngIf="cswRecord.funderOrg && cswRecord.funderOrg !== 'Unknown'"><b>Funder: </b>{{cswRecord.funderOrg}}</p>
<p *ngIf='cleanConstraints(cswRecord.constraints).length > 0'><b>Constraints: </b>{{cleanConstraints(cswRecord.constraints)}}</p>
<p *ngIf='selectConstraints(layer.capabilityRecords, cswRecord.accessConstraints).length > 0'><b>Access Constraints: </b>{{selectConstraints(layer.capabilityRecords, cswRecord.accessConstraints)}}</p>
<p *ngIf="cswRecord.recordInfoUrl && cswRecord.recordInfoUrl.length > 0"><b>Info URL: </b><a target="_blank" href="{{cswRecord.recordInfoUrl}}">Link to Geonetwork Record</a></p>
<div *ngFor="let onlineResource of cswRecord.onlineResources">
<p *ngIf="onlineResource.type==='DOI'">
<span class="label label-default"><b>DOI Name: </b></span> {{onlineResource.name}}<br>
<span class="label label-default"><b>Description: </b></span> {{onlineResource.description}}<br>
<span class="label label-default"><b>URL: </b></span><a target="_blank" href="{{onlineResource.url}}">{{onlineResource.url}}</a><br>
</p>
<p *ngIf="onlineResource.type!=='Unsupported' && onlineResource.type!=='DOI'">
<span *ngIf="isGetCapabilitiesType(onlineResource)" class="label label-default"><b>{{onlineResource.type}}: </b></span>
<a *ngIf="isGetCapabilitiesType(onlineResource)" target="_blank" href="{{ onlineResourceGetCapabilitiesUrl(onlineResource) }}">{{onlineResource.type}} GetCapabilities Info</a>
<span *ngIf="!isGetCapabilitiesType(onlineResource) && onlineResource.url" class="label label-default"><b>{{onlineResource.name.split('_').join(' ')}}: </b></span>
<a *ngIf="!isGetCapabilitiesType(onlineResource)" target="_blank" href="{{ removeProxy(onlineResource.url) }}">{{ removeProxy(onlineResource.url) }}</a>
</p>
</div>

</div>
Loading