globalSearch.jade 2.9 KB

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