Commit 4bd80a60 authored by dindigala's avatar dindigala
Browse files

Merge branch 'feature/#285-search-header' into 'develop'

feat: implementing of search in header and navigating to home or search page accordingly

See merge request !202
parents 4d41f8b1 7456a18f
Pipeline #215817 passed with stages
in 1 minute and 24 seconds
......@@ -202,7 +202,7 @@ export default {
}
if (this.manifests?.[0]?.sequence?.[0]?.id && !this.$route.query.itemurl) {
this.loaded = false;
this.$router.push({ query: { itemurl: this.manifests?.[0]?.sequence?.[0]?.id } });
this.$router.push({ query: { ...this.$route.query, itemurl: this.manifests?.[0]?.sequence?.[0]?.id } });
}
},
/**
......@@ -307,7 +307,7 @@ export default {
return;
}
this.loaded = false;
this.$router.push({ query: { itemurl: node.label } });
this.$router.push({ query: { ...this.$route.query, itemurl: node.label } });
},
},
);
......
......@@ -15,17 +15,35 @@
</template>
<q-breadcrumbs-el
:class="$q.dark.isActive ? 'text-dark' : 'text-white'"
:icon="fasHome"
>
<a
:class="$q.dark.isActive ? 'text-dark' : 'text-white'"
:href="`${config.breadcrumbNavigation.website}`"
class="header-links"
>
<q-icon
:name="fasHome"
/>
{{ $t(`${config.breadcrumbNavigation.title_homepage_key}`) }}
</a>
</q-breadcrumbs-el>
<q-breadcrumbs-el
v-if="!!searchTerm"
:class="$q.dark.isActive ? 'text-dark' : 'text-white'"
>
<a
:class="$q.dark.isActive ? 'text-dark' : 'text-white'"
:href="`${config.breadcrumbNavigation.website}search.html?searchTerm=${searchTerm}`"
class="header-links"
>
<q-icon
:name="fasSearch"
/>
{{ searchTerm }}
</a>
</q-breadcrumbs-el>
<q-breadcrumbs-el
:icon="fasFileAlt"
:label="$t(`${config.breadcrumbNavigation.title_viewer_key}`)"
......@@ -40,6 +58,7 @@ import {
fasHome,
fasFileAlt,
fasChevronRight,
fasSearch,
} from '@quasar/extras/fontawesome-v5';
export default {
......@@ -50,10 +69,16 @@ export default {
required: true,
},
},
computed: {
searchTerm() {
return this.$route.query.searchTerm;
},
},
created() {
this.fasHome = fasHome;
this.fasFileAlt = fasFileAlt;
this.fasChevronRight = fasChevronRight;
this.fasSearch = fasSearch;
},
};
</script>
......
......@@ -5,6 +5,7 @@
:class="$q.dark.isActive ? 'bg-white' : 'bg-accent'"
>
<BreadCrumbNavigation
v-if="$route.query.source==='external'"
:config="config"
/>
</div>
......
......@@ -31,7 +31,7 @@
-->
<script id="tido-config" type="application/json">
{
"entrypoint": "",
"entrypoint": "https://ahikar-dev.sub.uni-goettingen.de/api/textapi/ahikar/arabic-karshuni/collection.json",
"annotations": {
"show": true,
"types": [
......
......@@ -17,7 +17,7 @@ export default {
const link = this.itemurls[itemIndex];
this.defaultView();
this.$router.push({ query: { itemurl: link } });
this.$router.push({ query: { ...this.$route.query, itemurl: link } });
},
updateItem() {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment