globalSearch.jade 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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-instructions.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.tag msg.value }}
  32. else
  33. h1
  34. = resultsHeading.get
  35. a.fa.fa-link(title="{{_ 'link-to-search' }}" href="{{ getSearchHref }}")
  36. each card in results
  37. +resultCard(card)
  38. else
  39. .global-search-instructions
  40. h2 {{_ 'boards' }}
  41. .lists-wrapper
  42. each title in myBoardNames.get
  43. span.card-label.list-title.js-board-title
  44. = title
  45. h2 {{_ 'lists' }}
  46. .lists-wrapper
  47. each title in myLists.get
  48. span.card-label.list-title.js-list-title
  49. = title
  50. h2 {{_ 'label-colors' }}
  51. .palette-colors: each label in labelColors
  52. span.card-label.palette-color.js-label-color(class="card-label-{{label.color}}")
  53. = label.name
  54. if myLabelNames.get.length
  55. h2 {{_ 'label-names' }}
  56. .lists-wrapper
  57. each name in myLabelNames.get
  58. span.card-label.list-title.js-label-name
  59. = name
  60. +viewer
  61. = searchInstructions
  62. template(name="globalSearchViewChangePopup")
  63. if currentUser
  64. ul.pop-over-list
  65. li
  66. with "globalSearchViewChange-choice-me"
  67. a.js-global-search-view-me
  68. i.fa.fa-user.colorful
  69. | {{_ 'globalSearchViewChange-choice-me'}}
  70. if $eq Utils.globalSearchView "me"
  71. i.fa.fa-check
  72. li
  73. with "globalSearchViewChange-choice-all"
  74. a.js-global-search-view-all
  75. i.fa.fa-users.colorful
  76. | {{_ 'globalSearchViewChange-choice-all'}}
  77. span.sub-name
  78. +viewer
  79. | {{_ 'globalSearchViewChange-choice-all-description' }}
  80. if $eq Utils.globalSearchView "all"
  81. i.fa.fa-check