- small changes in dataset-detail.component.ts and dataset-detail.component.vue

This commit is contained in:
Arno Kaimbacher 2022-01-13 17:43:19 +01:00
parent a8c5e16014
commit c47934732b
5 changed files with 18 additions and 17 deletions

3
.gitignore vendored
View File

@ -21,4 +21,5 @@ pnpm-debug.log*
*.njsproj *.njsproj
*.sln *.sln
*.sw? *.sw?
/.env /.env
.env

View File

@ -31,10 +31,10 @@ export default class VsInput extends Vue {
private selectedIndex = 0; private selectedIndex = 0;
private selectedDisplay = ""; private selectedDisplay = "";
private solr: SolrSettings = { private solr: SolrSettings = {
// core: "rdr_data", // SOLR.core; core: "rdr_data", // SOLR.core;
// host: "tethys.at", host: "tethys.at",
core: "test_data", // SOLR.core; // core: "test_data", // SOLR.core;
host: "repository.geologie.ac.at", // host: "repository.geologie.ac.at",
}; };
// private rdrAPI!: DatasetService; // private rdrAPI!: DatasetService;
itemRefs!: Array<any>; itemRefs!: Array<any>;

View File

@ -116,7 +116,7 @@ export class DbDataset {
} }
} }
public hasMethodsAbtract(): boolean { public hasMethodsAbstract(): boolean {
if (this.abstracts.some((e) => e.type === AbstractType.Methods)) { if (this.abstracts.some((e) => e.type === AbstractType.Methods)) {
return true; return true;
} else { } else {
@ -164,15 +164,15 @@ export class DbDataset {
return this.abstracts.find((e) => e.type === AbstractType.Abstract); return this.abstracts.find((e) => e.type === AbstractType.Abstract);
} }
public get TranslatedAbtract(): Nullable<Abstract> { public get TranslatedAbstract(): Nullable<Abstract> {
return this.abstracts.find((e) => e.type === AbstractType.Translated); return this.abstracts.find((e) => e.type === AbstractType.Translated);
} }
public get SeriesInformationAbtract(): Nullable<Abstract> { public get SeriesInformationAbstract(): Nullable<Abstract> {
return this.abstracts.find((e) => e.type === AbstractType.Series_information); return this.abstracts.find((e) => e.type === AbstractType.Series_information);
} }
public get MethodsAbtract(): Nullable<Abstract> { public get MethodsAbstract(): Nullable<Abstract> {
return this.abstracts.find((e) => e.type === AbstractType.Methods); return this.abstracts.find((e) => e.type === AbstractType.Methods);
} }

View File

@ -75,21 +75,21 @@
<p>{{ dataset.MainAbstract.value }}</p> <p>{{ dataset.MainAbstract.value }}</p>
<br /> <br />
<p v-if="dataset.hasTranslatedAbstract()"> <p v-if="dataset.hasTranslatedAbstract()">
{{ dataset.TranslatedAbtract.value }} {{ dataset.TranslatedAbstract.value }}
</p> </p>
</div> </div>
</div> </div>
<div class="columns" v-if="dataset.hasOwnProperty('abstracts')"> <div class="columns" v-if="dataset.hasOwnProperty('abstracts')">
<div class="column is-3-desktop is-4-tablet label">Serieninformation/<br />series information:</div> <div class="column is-3-desktop is-4-tablet label">Serieninformation/<br />series information:</div>
<div class="column is-9-desktop is-8-tablet" v-if="dataset.hasSeriesInformationAbstract()"> <div class="column is-9-desktop is-8-tablet" v-if="dataset.hasSeriesInformationAbstract()">
{{ dataset.SeriesInformationAbstract.value }} {{ dataset.SeriesInformationAbstract?.value }}
</div> </div>
<div class="column is-9-desktop is-8-tablet" v-else>-</div> <div class="column is-9-desktop is-8-tablet" v-else>-</div>
</div> </div>
<div class="columns" v-if="dataset.hasOwnProperty('abstracts')"> <div class="columns" v-if="dataset.hasOwnProperty('abstracts')">
<div class="column is-3-desktop is-4-tablet label">Methodik/<br />method:</div> <div class="column is-3-desktop is-4-tablet label">Methodik/<br />method:</div>
<div class="column is-9-desktop is-8-tablet" v-if="dataset.hasMethodsAbtract()"> <div class="column is-9-desktop is-8-tablet" v-if="dataset.hasMethodsAbstract()">
{{ dataset.MethodsAbtract.value }} {{ dataset.MethodsAbstract.value }}
</div> </div>
<div class="column is-9-desktop is-8-tablet" v-else>-</div> <div class="column is-9-desktop is-8-tablet" v-else>-</div>
</div> </div>

View File

@ -44,10 +44,10 @@ export default class SearchViewComponent extends Vue {
loaded = false; loaded = false;
numFound!: number; numFound!: number;
private solr: SolrSettings = { private solr: SolrSettings = {
// core: "rdr_data", // SOLR.core; core: "rdr_data", // SOLR.core;
// host: "tethys.at", host: "tethys.at",
core: "test_data", // SOLR.core; // core: "test_data", // SOLR.core;
host: "repository.geologie.ac.at", // host: "repository.geologie.ac.at",
}; };
// private rdrAPI!: DatasetService; // private rdrAPI!: DatasetService;
private error = ""; private error = "";