globalSearch.jade 3.5 KB

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