- Icon and link for licenses added

- Listing of authors in list of publications corrected
- Coverage section improved
- Contributor section moved down
This commit is contained in:
Porras-Bernardez 2024-09-04 13:46:09 +02:00
parent bb7d8eb378
commit 50ab318854
5 changed files with 103 additions and 23 deletions

View File

@ -14,6 +14,16 @@ export default class VsResult extends Vue {
return this.datasets; return this.datasets;
} }
public simplifyAuthor(author:string): string {
if (author.endsWith(" ")) {
return author.substring(0, author.indexOf(","));
} else {
let firstNameInitial:string = author.charAt(author.indexOf(",") + 2);
return author.substring(0, author.indexOf(",") + 2) + firstNameInitial;
}
}
public getDomainWithoutSubdomain(): string { public getDomainWithoutSubdomain(): string {
const urlParts = new URL(window.location.href).hostname.split("."); const urlParts = new URL(window.location.href).hostname.split(".");

View File

@ -6,13 +6,34 @@
<a target="_blank" v-bind:href="'https://doi.org/' + document.identifier[0]"> <a target="_blank" v-bind:href="'https://doi.org/' + document.identifier[0]">
{{ "https://doi.org/" + document.identifier[0] + " &#10148;" }} </a {{ "https://doi.org/" + document.identifier[0] + " &#10148;" }} </a
>&nbsp; >&nbsp;
<span v-if="document.author && document.author.length > 0" class="disabled">{{ document.author[0] }}</span>
<!-- Display authors conditionally -->
<span v-if="document.author && document.author.length > 0">
<!-- For one author, just display the author's name -->
<span v-if="document.author.length === 1" class="disabled">
{{ simplifyAuthor(document.author[0]) }}
</span>
<!-- For 2-3 authors, display them all -->
<span v-if="document.author.length > 1 && document.author.length < 3">
<span v-for="(author, index) in document.author" :key="index" class="disabled">
{{ simplifyAuthor(author) }}<span v-if="index < document.author.length - 1" class="disabled">; </span>
</span>
</span>
<!-- For 4 or more authors, display the first three and add "et al." -->
<span v-if="document.author.length >= 3" class="disabled">
<span v-for="(author, index) in document.author.slice(0, 2)" :key="index" class="disabled">
{{ simplifyAuthor(author) }}<span v-if="index < 1" class="disabled">; </span>
</span>
et al.
</span>
</span>
</p> </p>
<h4> <h4>
<router-link class="ng-binding" v-bind:to="{ name: 'dataset', params: { datasetId: document.id } }">{{ <router-link class="ng-binding" v-bind:to="{ name: 'dataset', params: { datasetId: document.id } }">
document.title_output {{ document.title_output }}
}}</router-link> </router-link>
</h4> </h4>
<p class="clamped clamped-2"> <p class="clamped clamped-2">

View File

@ -274,7 +274,7 @@ export class DbDataset {
if (this.coverage.elevation_absolut != null) { if (this.coverage.elevation_absolut != null) {
elevation += "\n- Elevation Absolut: " + this.coverage.elevation_absolut + " m"; elevation += "\n- Elevation Absolut: " + this.coverage.elevation_absolut + " m";
} }
if (elevation != "") geoLocation += elevation; // if (elevation != "") geoLocation += ("\n---" + elevation);
let depth = ""; let depth = "";
if (this.coverage.depth_max != null && this.coverage.depth_min != null) { if (this.coverage.depth_max != null && this.coverage.depth_min != null) {
@ -283,16 +283,16 @@ export class DbDataset {
if (this.coverage.elevation_absolut != null) { if (this.coverage.elevation_absolut != null) {
depth += "\n- Depth Absolut: " + this.coverage.depth_absolut + " m"; depth += "\n- Depth Absolut: " + this.coverage.depth_absolut + " m";
} }
if (depth != "") geoLocation += depth; // if (depth != "") geoLocation += depth;
let time = ""; let time = "";
if (this.coverage.time_max != null && this.coverage.time_min != null) { 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) { 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; // if (time != "") geoLocation += time;
// let elevation = ""; // let elevation = "";
// if (this.coverage.elevation_max != null && this.coverage.elevation_min != null) { // if (this.coverage.elevation_max != null && this.coverage.elevation_min != null) {
@ -321,7 +321,13 @@ export class DbDataset {
// } // }
// if (time != "") geoLocation += time; // if (time != "") geoLocation += time;
return geoLocation; if (elevation != "" || depth != "" || time != "" ) {
return geoLocation + "\n ---" + elevation + depth + time;
} else {
return geoLocation + elevation + depth + time;
}
// return geoLocation;
} else { } else {
return ""; return "";
} }

View File

@ -177,7 +177,7 @@ export default class DatasetDetailComponent extends Vue {
.join(", "); .join(", ");
citation += " (" + dayjs(this.dataset.server_date_published).format("YYYY") + "): "; citation += " (" + dayjs(this.dataset.server_date_published).format("YYYY") + "): ";
citation += this.dataset.MainTitle?.value; citation += this.dataset.MainTitle?.value;
citation += "." + this.dataset.creating_corporation + ", "; citation += ". " + this.dataset.creating_corporation + ", ";
citation += this.dataset.publisher_name; citation += this.dataset.publisher_name;
citation += ", Wien"; citation += ", Wien";
return citation; return citation;

View File

@ -186,15 +186,7 @@
<!-- <data-metrics-badge v-bind:doi="dataset.identifier.value" display="small"></data-metrics-badge> --> <!-- <data-metrics-badge v-bind:doi="dataset.identifier.value" display="small"></data-metrics-badge> -->
</div> </div>
</div> </div>
<div class="card">
<div class="column">
<h3 class="label uppercase">Beitragende/Contributor</h3>
<p v-if="dataset.hasContributors()">
{{ dataset.contributors.map((u) => u.full_name).join(", ") }}
</p>
<p v-else>-</p>
</div>
</div>
<!-- <div class="card"> <!-- <div class="card">
<div class="column"> <div class="column">
<h3 class="label uppercase">Schlüsselwörter/Keywords</h3> <h3 class="label uppercase">Schlüsselwörter/Keywords</h3>
@ -263,7 +255,12 @@
<p v-if="dataset.hasLicenses()"> <p v-if="dataset.hasLicenses()">
<label v-for="license in dataset.licenses" v-bind:key="license.id"> <label v-for="license in dataset.licenses" v-bind:key="license.id">
<span class="normal label"> <span class="normal label">
{{ license.name }} <a v-if="license.name=='CC-BY-4.0'" target="_blank" class="link-label" v-bind:href="'https://creativecommons.org/licenses/by/4.0/'"
><i class="fa-brands fa-creative-commons"></i>&nbsp;{{ license.name }}</a
>
<a v-else target="_blank" class="link-label" v-bind:href="'https://creativecommons.org/licenses/by-sa/4.0/'"
><i class="fa-brands fa-creative-commons"></i>&nbsp;{{ license.name }}</a
>
</span> </span>
<span v-if="openAccessLicences.includes(license.name)" class="normal label uppercase" <span v-if="openAccessLicences.includes(license.name)" class="normal label uppercase"
><i class="fas fa-lock-open"></i> Open Access</span ><i class="fas fa-lock-open"></i> Open Access</span
@ -315,11 +312,57 @@
<p v-else>-</p> <p v-else>-</p>
</div> </div>
</div> </div>
<div class="card">
<div class="column">
<h3 class="label uppercase">Beitragende/Contributor</h3>
<p v-if="dataset.hasContributors()">
{{ dataset.contributors.map((u) => u.full_name).join(", ") }}
</p>
<p v-else>-</p>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="container-fluid" style="padding-top: 3.8em"> <div class="container-fluid" style="padding-top: 3.8em">
<!-- <div class="columns is-mobile partner-logos"> -->
<div class="columns">
<div class="column col-sm">
<div class="card mx-auto" style="width: 18rem; box-shadow: none; border: 0rem">
<div class="card-body">
<!-- <h5 class="card-title">About TETHYS</h5> -->
<a target="_blank" href="https://www.re3data.org/repository/r3d100013400">
<img src="@/assets/site/img/re3-data-logo-mono.jpg" alt="re3 data logo" />
</a>
</div>
</div>
</div>
<div class="column col-sm">
<div class="card mx-auto" style="width: 28rem; box-shadow: none; border: 0rem">
<div class="card-body">
<a target="_blank" href="http://www.geosphere.at/">
<img src="@/assets/site/img/geosphere-austria-logo.jpg" alt="logo geosphere austria" />
</a>
</div>
</div>
</div>
<div class="column col-sm">
<div class="card mx-auto" style="width: 18rem; box-shadow: none; border: 0rem">
<div class="card-body">
<a target="_blank" href="https://www.base-search.net/Search/Results?q=coll:fttethysrdr&refid=dctablede">
<img src="@/assets/site/img/base_logo.png" alt="logo base" />
</a>
</div>
</div>
</div>
</div>
</div>
<!-- <div class="container-fluid" style="padding-top: 3.8em">
<div class="columns is-mobile partner-logos"> <div class="columns is-mobile partner-logos">
<div class="column col-sm text-center"> <div class="column col-sm text-center">
<a target="_blank" href="https://www.re3data.org/repository/r3d100013400" <a target="_blank" href="https://www.re3data.org/repository/r3d100013400"
@ -329,7 +372,6 @@
<div class="column col-sm text-center"> <div class="column col-sm text-center">
<a target="_blank" href="http://www.geosphere.at/"> <a target="_blank" href="http://www.geosphere.at/">
<img src="@/assets/site/img/geosphere-austria-logo.jpg" class="pb-3" alt="logo geosphere austria" /> <img src="@/assets/site/img/geosphere-austria-logo.jpg" class="pb-3" alt="logo geosphere austria" />
<!-- <img src="@/assets/site/img/gbaLogoRGB_web.png" alt="GeoSphere Austria logo" /> -->
</a> </a>
</div> </div>
<div class="column col-sm text-center"> <div class="column col-sm text-center">
@ -338,7 +380,8 @@
</a> </a>
</div> </div>
</div> </div>
</div> </div> -->
</section> </section>
</template> </template>