globalSearch.jade 3.3 KB

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