globalSearch.jade 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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(
  16. id="global-search-input"
  17. type="text"
  18. name="searchQuery"
  19. placeholder="{{_ 'search-example'}}"
  20. value="{{ query.get }}"
  21. autofocus dir="auto"
  22. )
  23. if searching.get
  24. +spinner
  25. else if hasResults.get
  26. .global-search-results-list-wrapper
  27. if hasQueryErrors.get
  28. div
  29. each msg in errorMessages
  30. span.global-search-error-messages
  31. = msg
  32. else
  33. h1
  34. = resultsHeading.get
  35. a.fa.fa-link(title="{{_ 'link-to-search' }}" href="{{ getSearchHref }}")
  36. each card in results.get
  37. +resultCard(card)
  38. table.global-search-footer
  39. tr
  40. td.global-search-previous-page
  41. if hasPreviousPage.get
  42. button.js-previous-page
  43. | {{_ 'previous-page' }}
  44. td.global-search-next-page(align="right")
  45. if hasNextPage.get
  46. button.js-next-page
  47. | {{_ 'next-page' }}
  48. else
  49. .global-search-instructions
  50. h2 {{_ 'boards' }}
  51. .lists-wrapper
  52. each title in myBoardNames.get
  53. span.card-label.list-title.js-board-title
  54. = title
  55. h2 {{_ 'lists' }}
  56. .lists-wrapper
  57. each title in myLists.get
  58. span.card-label.list-title.js-list-title
  59. = title
  60. h2 {{_ 'label-colors' }}
  61. .palette-colors: each label in labelColors
  62. span.card-label.palette-color.js-label-color(class="card-label-{{label.color}}")
  63. = label.name
  64. if myLabelNames.get.length
  65. h2 {{_ 'label-names' }}
  66. .lists-wrapper
  67. each name in myLabelNames.get
  68. span.card-label.list-title.js-label-name
  69. = name
  70. +viewer
  71. = searchInstructions
  72. template(name="globalSearchViewChangePopup")
  73. if currentUser
  74. ul.pop-over-list
  75. li
  76. with "globalSearchViewChange-choice-me"
  77. a.js-global-search-view-me
  78. i.fa.fa-user.colorful
  79. | {{_ 'globalSearchViewChange-choice-me'}}
  80. if $eq Utils.globalSearchView "me"
  81. i.fa.fa-check
  82. li
  83. with "globalSearchViewChange-choice-all"
  84. a.js-global-search-view-all
  85. i.fa.fa-users.colorful
  86. | {{_ 'globalSearchViewChange-choice-all'}}
  87. span.sub-name
  88. +viewer
  89. | {{_ 'globalSearchViewChange-choice-all-description' }}
  90. if $eq Utils.globalSearchView "all"
  91. i.fa.fa-check