mirror of
https://github.com/wekan/wekan.git
synced 2025-04-22 04:57:07 -04:00
Add global search to user menu
* Add an entry to the user menu to access the global search page * remove some useless code
This commit is contained in:
parent
25dc779a73
commit
8f21c86737
2 changed files with 5 additions and 41 deletions
|
@ -181,48 +181,8 @@ BlazeComponent.extendComponent({
|
|||
// console.log('selector:', selector);
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('text:', text);
|
||||
|
||||
if (selector.boards.length) {
|
||||
selector.boardsSelector = {
|
||||
archived: false,
|
||||
title: { $in: [] },
|
||||
};
|
||||
selector.boards.forEach(term => {
|
||||
selector.boardsSelector.title.$in.push(term);
|
||||
});
|
||||
}
|
||||
|
||||
if (selector.lists.length) {
|
||||
selector.listsSelector = {
|
||||
archived: false,
|
||||
title: { $in: [] },
|
||||
};
|
||||
selector.lists.forEach(term => {
|
||||
selector.listsSelector.title.$in.push(term);
|
||||
});
|
||||
}
|
||||
|
||||
if (selector.swimlanes.length) {
|
||||
selector.swimlanesSelector = {
|
||||
archived: false,
|
||||
title: { $in: [] },
|
||||
};
|
||||
selector.swimlanes.forEach(term => {
|
||||
selector.swimlanesSelector.title.$in.push(term);
|
||||
});
|
||||
}
|
||||
|
||||
if (selector.labels.length) {
|
||||
selector.labelsSelector = {
|
||||
archived: false,
|
||||
title: { $in: [] },
|
||||
};
|
||||
selector.labels.forEach(term => {
|
||||
selector.labelsSelector.title.$in.push(term);
|
||||
});
|
||||
}
|
||||
|
||||
selector.text = text;
|
||||
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('selector:', selector);
|
||||
|
||||
|
|
|
@ -21,6 +21,10 @@ template(name="memberMenuPopup")
|
|||
a.js-due-cards(href="{{pathFor 'due-cards'}}")
|
||||
i.fa.fa-calendar
|
||||
| {{_ 'dueCards-title'}}
|
||||
li
|
||||
a.js-global-search(href="{{pathFor 'global-search'}}")
|
||||
i.fa.fa-search
|
||||
| {{_ 'globalSearch-title'}}
|
||||
li
|
||||
a.js-broken-cards(href="{{pathFor 'broken-cards'}}")
|
||||
i.fa.fa-chain-broken
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue