forked from geolba/tethys.frontend
- 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:
parent
bb7d8eb378
commit
50ab318854
5 changed files with 103 additions and 23 deletions
|
@ -14,6 +14,16 @@ export default class VsResult extends Vue {
|
|||
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 {
|
||||
const urlParts = new URL(window.location.href).hostname.split(".");
|
||||
|
||||
|
|
|
@ -6,13 +6,34 @@
|
|||
<a target="_blank" v-bind:href="'https://doi.org/' + document.identifier[0]">
|
||||
{{ "https://doi.org/" + document.identifier[0] + " ➤" }} </a
|
||||
>
|
||||
<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>
|
||||
|
||||
<h4>
|
||||
<router-link class="ng-binding" v-bind:to="{ name: 'dataset', params: { datasetId: document.id } }">{{
|
||||
document.title_output
|
||||
}}</router-link>
|
||||
<router-link class="ng-binding" v-bind:to="{ name: 'dataset', params: { datasetId: document.id } }">
|
||||
{{ document.title_output }}
|
||||
</router-link>
|
||||
</h4>
|
||||
|
||||
<p class="clamped clamped-2">
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue