globalSearch.jade 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. style="{# if hasResults.get #}display: inline-block;{#/if#}"
  33. id="global-search-input"
  34. type="text"
  35. name="searchQuery"
  36. placeholder="{{_ 'search-example'}}"
  37. value="{{ query.get }}"
  38. autofocus dir="auto"
  39. )
  40. a.js-new-search.fa.fa-eraser
  41. if searching.get
  42. +spinner
  43. else if hasResults.get
  44. .global-search-results-list-wrapper
  45. if hasQueryErrors.get
  46. ul
  47. each msg in errorMessages
  48. li.global-search-error-messages
  49. = msg
  50. else
  51. +resultsPaged(this)
  52. else if serverError.get
  53. .global-search-page
  54. .global-search-help
  55. h1 {{_ 'server-error' }}
  56. +viewer
  57. | {{_ 'server-error-troubleshooting' }}
  58. else
  59. .global-search-page
  60. .global-search-help
  61. h2 {{_ 'boards' }}
  62. .lists-wrapper
  63. each title in myBoardNames.get
  64. span.card-label.list-title.js-board-title
  65. = title
  66. h2 {{_ 'lists' }}
  67. .lists-wrapper
  68. each title in myLists.get
  69. span.card-label.list-title.js-list-title
  70. = title
  71. h2 {{_ 'label-colors' }}
  72. .palette-colors: each label in labelColors
  73. span.card-label.palette-color.js-label-color(class="card-label-{{label.color}}")
  74. = label.name
  75. if myLabelNames.get.length
  76. h2 {{_ 'label-names' }}
  77. .lists-wrapper
  78. each name in myLabelNames.get
  79. span.card-label.list-title.js-label-name
  80. = name
  81. .global-search-instructions
  82. +viewer
  83. = searchInstructions