globalSearch.jade 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. template(name="globalSearchHeaderBar")
  2. if currentUser
  3. h1
  4. i.fa.fa-search
  5. | {{_ 'globalSearch-title'}}
  6. template(name="globalSearchModalTitle")
  7. if currentUser
  8. h2
  9. i.fa.fa-keyboard-o
  10. | {{_ 'globalSearch-title'}}
  11. template(name="globalSearch")
  12. if currentUser
  13. .wrapper
  14. form.global-search-instructions.js-search-query-form
  15. input.global-search-query-input(type="text" name="searchQuery" placeholder="{{_ 'search-example'}}" autofocus dir="auto")
  16. if searching.get
  17. +spinner
  18. else if hasResults.get
  19. .global-search-dueat-list-wrapper
  20. h1
  21. if $eq resultsCount.get 0
  22. | {{_ 'no-cards-found' }}
  23. else if $eq resultsCount.get 1
  24. | {{_ 'one-card-found' }}
  25. else if $eq resultsCount.get totalHits.get
  26. | {{_ 'n-cards-found' resultsCount.get }}
  27. else
  28. | {{_ 'n-n-of-n-cards-found' 1 resultsCount.get totalHits.get }}
  29. if queryErrors.get
  30. div
  31. each msg in errorMessages
  32. span.global-search-error-messages
  33. | {{_ msg.tag msg.value }}
  34. each card in results
  35. +resultCard(card)
  36. else
  37. .global-search-instructions
  38. h1 Search Operators
  39. +viewer
  40. = 'Searches can include operators to refine the search. Operators are specified by writing the operator'
  41. = 'name and value separated by a colon. For example, an operator specification of `list:Blocked` would limit the search'
  42. = 'to cards that are contained in a list named *Blocked*. If the value contains spaces or special characters'
  43. = 'it must be enclosed in quotation marks (e.g. `list:"To Review"`).\n'
  44. = 'Available operators are:\n'
  45. = '* `board:title` - cards in boards matching the specified title\n'
  46. = '* `list:title` - cards in lists matching the specified title\n'
  47. = '* `swimlane:title` - cards in swimlanes matching the specified title\n'
  48. = '* `label:color` - cards that have a label matching the given color\n'
  49. = '* `label:name` - cards that have a label matching the given name\n'
  50. = '* `user:username` - cards where the specified user is a member or assignee\n'
  51. = '* `@username` - shorthand for `user:username`\n'
  52. = '* `#label` - shorthand for `label:color-or-name`\n'
  53. = '## Notes\n'
  54. = '* Multiple operators may be specified.\n'
  55. = '* Similar operators are *OR*ed together. Cards that match any of the conditions will be returned.\n'
  56. = ' `list:Available list:Blocked` would return cards contained in any list named *Blocked* or *Available*.\n'
  57. = '* Differing operators are *AND*ed together. Only cards that match all of the differing operators are returned.\n'
  58. = '`list:Available label:red` returns only cards in the list *Available* with a *red* label.\n'
  59. = '* Text searches are case insensitive.\n'
  60. template(name="globalSearchViewChangePopup")
  61. if currentUser
  62. ul.pop-over-list
  63. li
  64. with "globalSearchViewChange-choice-me"
  65. a.js-global-search-view-me
  66. i.fa.fa-user.colorful
  67. | {{_ 'globalSearchViewChange-choice-me'}}
  68. if $eq Utils.globalSearchView "me"
  69. i.fa.fa-check
  70. li
  71. with "globalSearchViewChange-choice-all"
  72. a.js-global-search-view-all
  73. i.fa.fa-users.colorful
  74. | {{_ 'globalSearchViewChange-choice-all'}}
  75. span.sub-name
  76. +viewer
  77. | {{_ 'globalSearchViewChange-choice-all-description' }}
  78. if $eq Utils.globalSearchView "all"
  79. i.fa.fa-check