globalSearch.jade 3.1 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="globalSearch")
  12. if currentUser
  13. .wrapper
  14. form.global-search-page.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-page
  50. .global-search-help
  51. h2 {{_ 'boards' }}
  52. .lists-wrapper
  53. each title in myBoardNames.get
  54. span.card-label.list-title.js-board-title
  55. = title
  56. h2 {{_ 'lists' }}
  57. .lists-wrapper
  58. each title in myLists.get
  59. span.card-label.list-title.js-list-title
  60. = title
  61. h2 {{_ 'label-colors' }}
  62. .palette-colors: each label in labelColors
  63. span.card-label.palette-color.js-label-color(class="card-label-{{label.color}}")
  64. = label.name
  65. if myLabelNames.get.length
  66. h2 {{_ 'label-names' }}
  67. .lists-wrapper
  68. each name in myLabelNames.get
  69. span.card-label.list-title.js-label-name
  70. = name
  71. .global-search-instructions
  72. +viewer
  73. = searchInstructions
  74. template(name="globalSearchViewChangePopup")
  75. if currentUser
  76. ul.pop-over-list
  77. li
  78. with "globalSearchViewChange-choice-me"
  79. a.js-global-search-view-me
  80. i.fa.fa-user.colorful
  81. | {{_ 'globalSearchViewChange-choice-me'}}
  82. if $eq Utils.globalSearchView "me"
  83. i.fa.fa-check
  84. li
  85. with "globalSearchViewChange-choice-all"
  86. a.js-global-search-view-all
  87. i.fa.fa-users.colorful
  88. | {{_ 'globalSearchViewChange-choice-all'}}
  89. span.sub-name
  90. +viewer
  91. | {{_ 'globalSearchViewChange-choice-all-description' }}
  92. if $eq Utils.globalSearchView "all"
  93. i.fa.fa-check