Facet filtering modified:

- Author and Subjects substituted by Creator and Keyword
- Facet labels now separated by "|" instead of comma
This commit is contained in:
Porras-Bernardez 2024-08-09 16:17:30 +02:00
parent cc62df68da
commit 110c2db8bf
6 changed files with 89 additions and 40 deletions

View file

@ -21,8 +21,22 @@ export default class ActiveFacetCategory extends Vue {
// @Prop([String])
// alias;
/**
* The alias for the Active facet box will be set depending on the name of the category.
* This will allow to display the customised terms "creator" and "keyword" instead of the values currently used in the OpenSearch index: "author" and "subjects"
* TODO: This should be corrected directly in the index
*/
get alias(): string {
return this.categoryName == "doctype" ? "datatype" : this.categoryName;
// return this.categoryName == "doctype" ? "datatype" : this.categoryName;
// console.log("getAlias!");
switch (this.categoryName) {
case "author":
return "creator";
case "subjects":
return "keyword";
default:
return this.categoryName;
}
}
// get filterItems(): Array<string> {

View file

@ -3,7 +3,7 @@
<input v-bind:id="alias" v-bind:name="alias" type="checkbox" checked="checked" class="css-checkbox" @click.prevent="deactivateFacetCategory()" />
<label v-bind:for="alias" class="css-label">
<span>{{ alias + ": " }}</span>
<a v-if="filterItems && filterItems.length > 0" class="gbaterm">{{ filterItems.join(", ") }}</a>
<a v-if="filterItems && filterItems.length > 0" class="gsaterm">{{ filterItems.join(" | ") }}</a>
</label>
</div>
</template>
@ -18,7 +18,7 @@ th,
td {
border-bottom: 0px solid #e1e1e1;
}
.gbaterm {
.gsaterm {
color: #0099cc;
border: 1px solid rgb(200, 210, 255);
padding: 4px;