globalSearch.jade 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. template(name="globalSearchHeaderBar")
  2. if currentUser
  3. h1
  4. | 🔍
  5. | {{_ 'globalSearch-title'}}
  6. template(name="globalSearchModalTitle")
  7. if currentUser
  8. h2
  9. | ⌨️
  10. | {{_ 'globalSearch-title'}}
  11. template(name="resultsPaged")
  12. if resultsHeading.get
  13. h1
  14. = resultsHeading.get
  15. a(title="{{_ 'link-to-search' }}" href="{{ getSearchHref }}")
  16. | 🔗
  17. each card in results.get
  18. +resultCard(card)
  19. table.global-search-footer
  20. tr
  21. td.global-search-previous-page
  22. if hasPreviousPage.get
  23. button.js-previous-page
  24. | {{_ 'previous-page' }}
  25. td.global-search-next-page(align="right")
  26. if hasNextPage.get
  27. button.js-next-page
  28. | {{_ 'next-page' }}
  29. template(name="globalSearch")
  30. if currentUser
  31. .wrapper
  32. form.global-search-page.js-search-query-form
  33. input.global-search-query-input(
  34. style="{# if hasResults.get #}display: inline-block;{#/if#}"
  35. id="global-search-input"
  36. type="text"
  37. name="searchQuery"
  38. placeholder="{{_ 'search-example'}}"
  39. value="{{ query.get }}"
  40. autofocus dir="auto"
  41. )
  42. a.js-new-search
  43. | 🧹
  44. if debug.get.show
  45. h1 Debug
  46. if debug.get.showSelector
  47. h2 Selector
  48. button.js-copy-debug-selector
  49. = 'Copy'
  50. pre(
  51. id="debug-selector"
  52. )
  53. = sessionData.selector
  54. if debug.get.showProjection
  55. h2 Projection
  56. button.js-copy-debug-projection
  57. = 'Copy'
  58. pre(
  59. id="debug-projection"
  60. )
  61. = sessionData.projection
  62. if searching.get
  63. +spinner
  64. else if hasResults.get
  65. .global-search-results-list-wrapper
  66. if hasQueryErrors.get
  67. ul
  68. each msg in errorMessages
  69. li.global-search-error-messages
  70. = msg
  71. +resultsPaged(this)
  72. else if serverError.get
  73. .global-search-page
  74. .global-search-help
  75. h1 {{_ 'server-error' }}
  76. +viewer
  77. | {{_ 'server-error-troubleshooting' }}
  78. else
  79. .global-search-page
  80. .global-search-help
  81. h2 {{_ 'boards' }}
  82. .lists-wrapper
  83. each title in myBoardNames.get
  84. span.card-label.list-title.js-board-title
  85. = title
  86. h2 {{_ 'lists' }}
  87. .lists-wrapper
  88. each title in myLists.get
  89. span.card-label.list-title.js-list-title
  90. = title
  91. h2 {{_ 'label-colors' }}
  92. .palette-colors: each label in labelColors
  93. span.card-label.palette-color.js-label-color(class="card-label-{{label.color}}")
  94. = label.name
  95. if myLabelNames.get.length
  96. h2 {{_ 'label-names' }}
  97. .lists-wrapper
  98. each name in myLabelNames.get
  99. span.card-label.list-title.js-label-name
  100. = name
  101. .global-search-instructions
  102. +viewer
  103. = searchInstructions