diff --git a/src/router/index.ts b/src/router/index.ts index e0c2144..24320b9 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -33,6 +33,12 @@ const routes = [ component: DatasetDetailComponent, props: true, }, + // { + // path: "/10.24341/tethys.:datasetId", + // name: "dataset2", + // component: DatasetDetailComponent, + // props: true, + // }, { path: "/services", name: "Services", diff --git a/src/services/dataset.service.ts b/src/services/dataset.service.ts index b1a10e4..45ab5a4 100644 --- a/src/services/dataset.service.ts +++ b/src/services/dataset.service.ts @@ -128,6 +128,7 @@ class DatasetService { // fq: ["subject:Steiermark", "language:de"], fq: filterFields, start: start, + sort: "server_date_published desc", facet: "on", // "facet.field": "language", "json.facet.language": '{ type: "terms", field: "language" }', diff --git a/src/views/dataset-detail.component.ts/dataset-detail.component.ts b/src/views/dataset-detail.component.ts/dataset-detail.component.ts index 8dcfd0d..44062e2 100644 --- a/src/views/dataset-detail.component.ts/dataset-detail.component.ts +++ b/src/views/dataset-detail.component.ts/dataset-detail.component.ts @@ -106,7 +106,16 @@ export default class DatasetDetailComponent extends Vue { } public getCitation(): string { - let citation = this.dataset.contributors.map((u) => u.last_name + ", " + u.first_name.substring(0, 1).toUpperCase() + ".").join(", "); + let citation = this.dataset.authors + .map((u) => { + let name = u.last_name; + if (u.first_name) { + name += ", " + u.first_name?.substring(0, 1).toUpperCase() + "."; + } + return name; + // u.last_name + ", " + u.first_name?.substring(0, 1).toUpperCase() + "." + }) + .join(", "); citation += " " + moment(this.dataset.server_date_published).format("YYYY") + ": "; citation += this.dataset.MainTitle?.value; citation += "." + this.dataset.creating_corporation + ", ";