globalSearch.jade 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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 resultCount.get 0
  19. | {{_ 'no-results' }}
  20. else if $eq resultCount.get 1
  21. | {{_ 'one-result' }}
  22. else
  23. | {{_ 'n-results' resultsCount.get }}
  24. if queryErrors.get
  25. div
  26. each msg in errorMessages
  27. span.global-search-error-messages
  28. | {{_ msg.tag msg.value }}
  29. each card in results
  30. .global-search-card-wrapper
  31. a.minicard-wrapper.card-title(href=card.absoluteUrl)
  32. +minicard(card)
  33. //= card.title
  34. ul.global-search-context-list
  35. li.global-search-context(title="{{_ 'board'}}")
  36. +viewer
  37. = card.getBoard.title
  38. li.global-search-context.global-search-context-separator
  39. = ' '
  40. | {{_ 'context-separator'}}
  41. = ' '
  42. li.global-search-context(title="{{_ 'swimlane'}}")
  43. +viewer
  44. = card.getSwimlane.title
  45. li.global-search-context
  46. = ' '
  47. | {{_ 'context-separator'}}
  48. = ' '
  49. li.global-search-context(title="{{_ 'list'}}")
  50. +viewer
  51. = card.getList.title
  52. else
  53. .global-search-instructions
  54. h1 Search Operators
  55. +viewer
  56. = 'Searches can include the operators to refine the search. Operators are specified by writing the operator'
  57. = 'name and value separated by a colon. An operator specification of `list:Blocked` would limit the search'
  58. = 'to cards that are contained in a list named *Blocked*. If the value contains spaces or special characters'
  59. = 'it most be enclosed in quotation marks (e.g. `list:"To Review"`).\n'
  60. = 'Available operators are:\n'
  61. = '* `board:title` - cards in boards with the specified title\n'
  62. = '* `list:title` - cards in lists with the specified title\n'
  63. = '* `swimlane:title` - cards in swimlanes with the specified title\n'
  64. = '* `label:color` - cards that have a label with the given color\n'
  65. = '* `label:name` - cards that have a label with the given name\n'
  66. = '* `user:username` - cards where the specified user is a member or assignee\n'
  67. = '* `@username` - shorthand for `user:username`\n'
  68. = '* `#label` - shorthand for `label:color-or-name`\n'
  69. = '## Notes\n'
  70. = '* Multiple operators may be specified.\n'
  71. = '* Similar operators are ORed together. Cards that match any of the conditions will be returned.\n'
  72. = ' `list:Available list:Blocked` would return cards contained in any list named *Blocked* or *Available*.\n'
  73. = '* Differing operators are ANDed together. Only cards that match each of the differing operators are returned.'
  74. = '`list:Available label:red` returns only cards in the list *Available* with a *red* label.\n'
  75. = '* Text searches are case insensitive.\n'
  76. template(name="globalSearchViewChangePopup")
  77. ul.pop-over-list
  78. li
  79. with "globalSearchViewChange-choice-me"
  80. a.js-global-search-view-me
  81. i.fa.fa-user.colorful
  82. | {{_ 'globalSearchViewChange-choice-me'}}
  83. if $eq Utils.globalSearchView "me"
  84. i.fa.fa-check
  85. li
  86. with "globalSearchViewChange-choice-all"
  87. a.js-global-search-view-all
  88. i.fa.fa-users.colorful
  89. | {{_ 'globalSearchViewChange-choice-all'}}
  90. span.sub-name
  91. +viewer
  92. | {{_ 'globalSearchViewChange-choice-all-description' }}
  93. if $eq Utils.globalSearchView "all"
  94. i.fa.fa-check