IndexView.handlebars 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <h1 class="screenreader-only">
  2. {{#t "discussion_topics"}}Discussion Topics{{/t}}
  3. </h1>
  4. {{#ifAll atLeastOnePageFetched length}}
  5. <div class="headerBar clearfix">
  6. <div class="pull-left form-inline index_view_filter_form">
  7. <span id="searchTermDescription" class="screenreader-only">
  8. {{#t}}As you type in this field, the list of results will be automatically updated.{{/t}}
  9. </span>
  10. <label class="screenreader-only" for="searchTerm">
  11. {{t "Search title, body, or author"}}"
  12. </label>
  13. <input id="searchTerm"
  14. placeholder="{{t "Search title, body, or author"}}"
  15. aria-describedby="searchTermDescription"
  16. value="{{searchTerm}}"
  17. type="search">
  18. <span id="discussionsFilter">
  19. <input type="checkbox"
  20. id="onlyUnread"
  21. {{#if onlyUnread}}checked{{/if}} />
  22. <label for="onlyUnread" class="no-button-role">
  23. <span aria-hidden="true">{{#t "unread"}}Unread{{/t}}</span>
  24. </label>
  25. <input type="checkbox"
  26. id="onlyGraded"
  27. {{#if onlyGraded}}checked{{/if}}/>
  28. <label for="onlyGraded" class="no-button-role">
  29. <span aria-hidden="true">{{#t "assignments"}}Assignments{{/t}}</span>
  30. </label>
  31. </span>
  32. <div id="searchResultCount" aria-live="polite" class="screenreader-only"></div>
  33. </div>
  34. <div class="pull-right form-inline">
  35. {{#if options.atom_feed_url}}
  36. <a class="btn"
  37. href="{{options.atom_feed_url}}"
  38. data-tooltip
  39. title="{{#t "rss_feed"}}RSS feed{{/t}}">
  40. <i class="icon-rss"></i>
  41. </a>
  42. {{/if}}
  43. <span id="actionsForSelectedDiscussions" style="display:none;">
  44. <input type="checkbox" id="lock" />
  45. <label for="lock" data-tooltip>{{#t "lock_for_comments"}}Lock for comments{{/t}}</label>
  46. <button id="delete" data-tooltip>{{#t "delete"}}Delete{{/t}}</button>
  47. </span>
  48. {{#if options.permissions.create}}
  49. <a
  50. href="{{new_topic_url}}"
  51. class="btn btn-primary icon-plus"
  52. id="new-discussion-btn"
  53. role="button"
  54. title='{{#t "title_start_a_discussion"}}Start a Discussion{{/t}}'
  55. aria-label='{{#t "title_start_a_discussion"}}Start a Discussion{{/t}}'
  56. >{{#t}}Discussion{{/t}}</a>
  57. {{/if}}
  58. <button
  59. id="edit_discussions_settings"
  60. class="btn"
  61. data-tooltip="{{#if options.permissions.create}}top{{else}}left{{/if}}"
  62. title='{{#t "edit_settings"}}Edit Discussions Settings{{/t}}'>
  63. <i class="icon-settings"></i>
  64. </button>
  65. </div>
  66. </div>
  67. <div class="nothingMatchedFilter" style="display:none;">
  68. <p>
  69. {{#t "your_search_did_not_match_any_discussion_topics"}}Your search did not match any discussion topics.{{/t}}
  70. </p>
  71. <p>
  72. {{#t "suggestions"}}Suggestions:{{/t}}
  73. <ul>
  74. <li>{{#t "make_sure_all_search_terms_are_spelled_correctly"}}Make sure all search terms are spelled correctly.{{/t}}</li>
  75. <li>{{#t "try_different_more_general_or_fewer_keywords"}}Try different, more general, or fewer keywords.{{/t}}</li>
  76. <li>{{#t "try_disabling_the_unread_or_assignments_filters"}}Try disabling the "Unread" or "Assignments" filters.{{/t}}</li>
  77. </ul>
  78. </div>
  79. <span tabindex="0" class="screenreader-only accessibility-warning">Warning: For improved accessibility in re-ordering a Pinned Discussion, please use the Move To Dialog option found in the menu.</span>
  80. <div class="discussion-collections">
  81. <div class="pinned discussion-list item-group"></div>
  82. <div class="open discussion-list item-group"></div>
  83. <div class="locked discussion-list item-group"></div>
  84. </div>
  85. {{else}}
  86. {{#if lastPageFetched}}
  87. <div style="margin:auto; text-align: center; margin-top: 80px">
  88. <h1>
  89. {{#t "there_are_no_discussion_topics_to_show"}}There are no discussion topics to show{{/t}}
  90. </h1>
  91. {{#if options.permissions.create}}
  92. <a href="{{new_topic_url}}" class="btn btn-large btn-primary">
  93. {{#t "start_one_now"}}Start One Now{{/t}}
  94. </a>
  95. {{/if}}
  96. </div>
  97. {{else}}
  98. <h2>{{#t "loading"}}Loading...{{/t}}</h2>
  99. {{/if}}
  100. {{/ifAll}}