globalSearch.jade 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. a.minicard-wrapper(href=card.absoluteUrl)
  36. +resultCard(card)
  37. else
  38. .global-search-instructions
  39. h1 Search Operators
  40. +viewer
  41. = 'Searches can include operators to refine the search. Operators are specified by writing the operator'
  42. = 'name and value separated by a colon. For example, an operator specification of `list:Blocked` would limit the search'
  43. = 'to cards that are contained in a list named *Blocked*. If the value contains spaces or special characters'
  44. = 'it must be enclosed in quotation marks (e.g. `list:"To Review"`).\n'
  45. = 'Available operators are:\n'
  46. = '* `board:title` - cards in boards matching the specified title\n'
  47. = '* `list:title` - cards in lists matching the specified title\n'
  48. = '* `swimlane:title` - cards in swimlanes matching the specified title\n'
  49. = '* `label:color` - cards that have a label matching the given color\n'
  50. = '* `label:name` - cards that have a label matching the given name\n'
  51. = '* `user:username` - cards where the specified user is a member or assignee\n'
  52. = '* `@username` - shorthand for `user:username`\n'
  53. = '* `#label` - shorthand for `label:color-or-name`\n'
  54. = '## Notes\n'
  55. = '* Multiple operators may be specified.\n'
  56. = '* Similar operators are *OR*ed together. Cards that match any of the conditions will be returned.\n'
  57. = ' `list:Available list:Blocked` would return cards contained in any list named *Blocked* or *Available*.\n'
  58. = '* Differing operators are *AND*ed together. Only cards that match all of the differing operators are returned.\n'
  59. = '`list:Available label:red` returns only cards in the list *Available* with a *red* label.\n'
  60. = '* Text searches are case insensitive.\n'
  61. template(name="globalSearchViewChangePopup")
  62. if currentUser
  63. ul.pop-over-list
  64. li
  65. with "globalSearchViewChange-choice-me"
  66. a.js-global-search-view-me
  67. i.fa.fa-user.colorful
  68. | {{_ 'globalSearchViewChange-choice-me'}}
  69. if $eq Utils.globalSearchView "me"
  70. i.fa.fa-check
  71. li
  72. with "globalSearchViewChange-choice-all"
  73. a.js-global-search-view-all
  74. i.fa.fa-users.colorful
  75. | {{_ 'globalSearchViewChange-choice-all'}}
  76. span.sub-name
  77. +viewer
  78. | {{_ 'globalSearchViewChange-choice-all-description' }}
  79. if $eq Utils.globalSearchView "all"
  80. i.fa.fa-check