- Coverage section reformatted

- Keywords section converted in linked elements
This commit is contained in:
Porras-Bernardez 2024-09-03 16:13:27 +02:00
parent 826c5b8c4e
commit bb7d8eb378
3 changed files with 83 additions and 12 deletions

View File

@ -235,17 +235,31 @@ export class DbDataset {
const yMax = this.coverage.y_max;
// const elevationAbsolut = this.coverage.elevation_absolut;
// let geoLocation =
// "- SOUTH-BOUND LATITUDE: " +
// yMin +
// "\n" +
// "- WEST-BOUND LONGITUDE: " +
// xMin +
// "\n" +
// "- NORTH-BOUND LATITUDE: " +
// yMax +
// "\n" +
// "- EAST-BOUND LONGITUDE: " +
// xMax;
let geoLocation =
"* SOUTH-BOUND LATITUDE: " +
// "- SOUTH-BOUND LATITUDE: " +
"- South-bound Latitude: " +
yMin +
"\n" +
"* WEST-BOUND LONGITUDE: " +
"- West-bound Longitude: " +
xMin +
"\n" +
"* NORTH-BOUND LATITUDE: " +
"- North-bound Latitude: " +
yMax +
"\n" +
"* EAST-BOUND LONGITUDE: " +
"- East-bound Longitude: " +
xMax;
// geoLocation += elevationAbsolut != null ? ` * ELEVATION ABSOLUT: ${elevationAbsolut}\n` : "";
@ -254,31 +268,59 @@ export class DbDataset {
let elevation = "";
if (this.coverage.elevation_max != null && this.coverage.elevation_min != null) {
elevation += "\n* ELEVATION MIN: " + this.coverage.elevation_min + " *\nELEVATION MAX: " + this.coverage.elevation_max;
// elevation += "\n- ELEVATION MIN: " + this.coverage.elevation_min + " \n- ELEVATION MAX: " + this.coverage.elevation_max;
elevation += "\n- Elevation Min.: " + this.coverage.elevation_min + " m\n- Elevation Max.: " + this.coverage.elevation_max + " m";
}
if (this.coverage.elevation_absolut != null) {
elevation += "\n* ELEVATION ABSOLUT: " + this.coverage.elevation_absolut;
elevation += "\n- Elevation Absolut: " + this.coverage.elevation_absolut + " m";
}
if (elevation != "") geoLocation += elevation;
let depth = "";
if (this.coverage.depth_max != null && this.coverage.depth_min != null) {
depth += "\n* DEPTH MIN: " + this.coverage.depth_min + "\n* DEPTH MAX: " + this.coverage.depth_max;
depth += "\n- Depth Min.: " + this.coverage.depth_min + " m\n- Depth Max.: " + this.coverage.depth_max + " m";
}
if (this.coverage.elevation_absolut != null) {
depth += "\n* DEPTH ABSOLUT: " + this.coverage.depth_absolut;
depth += "\n- Depth Absolut: " + this.coverage.depth_absolut + " m";
}
if (depth != "") geoLocation += depth;
let time = "";
if (this.coverage.time_max != null && this.coverage.time_min != null) {
time += "\n* TIME MIN: " + this.coverage.time_min + "\n* TIME MAX: " + this.coverage.time_max;
time += "\n* Time Min.: " + this.coverage.time_min + "\n* Time Max.: " + this.coverage.time_max;
}
if (this.coverage.time_absolut != null) {
time += "\n* TIME ABSOLUT: " + this.coverage.time_absolut;
time += "\n* Time Absolut: " + this.coverage.time_absolut;
}
if (time != "") geoLocation += time;
// let elevation = "";
// if (this.coverage.elevation_max != null && this.coverage.elevation_min != null) {
// elevation += "\n* ELEVATION MIN: " + this.coverage.elevation_min + " \n* ELEVATION MAX: " + this.coverage.elevation_max;
// }
// if (this.coverage.elevation_absolut != null) {
// elevation += "\n* ELEVATION ABSOLUT: " + this.coverage.elevation_absolut;
// }
// if (elevation != "") geoLocation += elevation;
// let depth = "";
// if (this.coverage.depth_max != null && this.coverage.depth_min != null) {
// depth += "\n* DEPTH MIN: " + this.coverage.depth_min + "\n* DEPTH MAX: " + this.coverage.depth_max;
// }
// if (this.coverage.elevation_absolut != null) {
// depth += "\n* DEPTH ABSOLUT: " + this.coverage.depth_absolut;
// }
// if (depth != "") geoLocation += depth;
// let time = "";
// if (this.coverage.time_max != null && this.coverage.time_min != null) {
// time += "\n* TIME MIN: " + this.coverage.time_min + "\n* TIME MAX: " + this.coverage.time_max;
// }
// if (this.coverage.time_absolut != null) {
// time += "\n* TIME ABSOLUT: " + this.coverage.time_absolut;
// }
// if (time != "") geoLocation += time;
return geoLocation;
} else {
return "";

View File

@ -156,6 +156,14 @@ export default class DatasetDetailComponent extends Vue {
// return moment(date).format("YYYY");
}
public getLanguage(language: string): string {
if (language === "de") {
return "Deutsch"
} else {
return "English"
}
}
public getCitation(): string {
let citation = this.dataset.authors
.map((u) => {

View File

@ -195,7 +195,7 @@
<p v-else>-</p>
</div>
</div>
<div class="card">
<!-- <div class="card">
<div class="column">
<h3 class="label uppercase">Schlüsselwörter/Keywords</h3>
<p v-if="dataset.hasOwnProperty('subjects')">
@ -203,7 +203,28 @@
</p>
<p v-else>-</p>
</div>
</div> -->
<div class="card">
<div class="column">
<h3 class="label uppercase">Schlüsselwörter/Keywords</h3>
<p v-if="dataset.hasOwnProperty('subjects')">
<span v-for="(subject, index) in dataset.subjects" :key="subject.value">
<router-link
:to="{ name: 'Search', params: { display: subject.value, type: 'subjects' } }"
class="link-label"
>
{{ subject.value }}
</router-link>
<!-- Add a comma and space after each keyword except the last one -->
<span v-if="index < dataset.subjects.length - 1">, </span>
</span>
</p>
<p v-else>-</p>
</div>
</div>
<div class="card">
<div class="column">
<h3 class="label uppercase">Erstellungsjahr/Year</h3>
@ -224,7 +245,7 @@
<div class="column">
<h3 class="label uppercase">Sprache/Language</h3>
<p>
{{ dataset.language }}
{{ getLanguage(dataset.language) }}
</p>
</div>
</div>