mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
Add link to search header for storing search
This commit is contained in:
parent
409b8559d7
commit
7e8475e64d
4 changed files with 13 additions and 4 deletions
|
|
@ -27,6 +27,7 @@ template(name="globalSearch")
|
|||
else
|
||||
h1
|
||||
= resultsHeading.get
|
||||
a.fa.fa-link(title="{{_ 'link-to-search' }}" href="{{ getSearchHref }}")
|
||||
each card in results
|
||||
+resultCard(card)
|
||||
else
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ BlazeComponent.extendComponent({
|
|||
this.hasQueryErrors = new ReactiveVar(false);
|
||||
this.query = new ReactiveVar('');
|
||||
this.resultsHeading = new ReactiveVar('');
|
||||
this.searchLink = new ReactiveVar(null);
|
||||
this.queryParams = null;
|
||||
this.parsingErrors = [];
|
||||
this.resultsCount = 0;
|
||||
|
|
@ -258,6 +259,11 @@ BlazeComponent.extendComponent({
|
|||
});
|
||||
},
|
||||
|
||||
getSearchHref() {
|
||||
const baseUrl = window.location.href.replace(/([?#].*$|\s*$)/, '');
|
||||
return `${baseUrl}?q=${encodeURIComponent(this.query.get())}`;
|
||||
},
|
||||
|
||||
searchInstructions() {
|
||||
tags = {
|
||||
operator_board: TAPi18n.__('operator-board'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue