- link to doi.tethys subdomain in search results
This commit is contained in:
parent
b6338b0543
commit
8d8fafd3db
File diff suppressed because one or more lines are too long
|
@ -15,6 +15,15 @@ export default class VsResults extends Vue {
|
|||
return this.data;
|
||||
};
|
||||
|
||||
getDomainWithoutSubdomain () {
|
||||
const urlParts = new URL(window.location.href).hostname.split('.')
|
||||
|
||||
return urlParts
|
||||
.slice(0)
|
||||
.slice(-(urlParts.length === 4 ? 3 : 2))
|
||||
.join('.')
|
||||
}
|
||||
|
||||
truncate(text, limit) {
|
||||
text = text === undefined ? '' : text;
|
||||
const content = text.split(' ').slice(0, limit);
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
</p>
|
||||
|
||||
<h4>
|
||||
<a target="_self" v-bind:href="'https://doi.'+ app_url +'/' + datacite_prefix + '/tethys.' + document.id" class="ng-binding">
|
||||
<a v-if="document.identifier && document.identifier.length > 0" target="_self" v-bind:href="'https://doi.'+ getDomainWithoutSubdomain() +'/' + document.identifier[0]" class="ng-binding">
|
||||
{{ document.title_output }}
|
||||
</a>
|
||||
</h4>
|
||||
|
|
Loading…
Reference in New Issue
Block a user