mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
Global search development
* Add translation tags * Use translation tags for showing result count * Add logic for selecting cards by labels * Readd code for searching card text that was mistakenly deleted
This commit is contained in:
parent
a647768368
commit
25dc779a73
5 changed files with 77 additions and 9 deletions
|
|
@ -17,8 +17,12 @@ template(name="globalSearch")
|
|||
else if hasResults.get
|
||||
.global-search-dueat-list-wrapper
|
||||
h1
|
||||
= resultsCount.get
|
||||
| Results
|
||||
if $eq resultCount.get 0
|
||||
| {{_ 'no-results' }}
|
||||
else if $eq resultCount.get 1
|
||||
| {{_ 'one-result' }}
|
||||
else
|
||||
| {{_ 'n-results' resultsCount.get }}
|
||||
if queryErrors.get
|
||||
div
|
||||
each msg in errorMessages
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ BlazeComponent.extendComponent({
|
|||
const reLabel = /^#(?<label>[\w:-]+)(\s+|$)/;
|
||||
const reOperator1 = /^(?<operator>\w+):(?<value>\w+)(\s+|$)/;
|
||||
const reOperator2 = /^(?<operator>\w+):(?<quote>["']*)(?<value>.*?)\k<quote>(\s+|$)/;
|
||||
const reText = /^(?<text>[^:@#\s]+)(\s+|$)/;
|
||||
const reText = /^(?<text>\S+)(\s+|$)/;
|
||||
const reQuotedText = /^(?<quote>["'])(?<text>\w+)\k<quote>(\s+|$)/;
|
||||
const operatorMap = {
|
||||
board: 'boards',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue