IndexView.handlebars 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. {{#if this.length}}
  2. <h2>External Feeds</h2>
  3. {{/if}}
  4. <ul class="right-side-list">
  5. {{#each this}}
  6. <li class="external_feed">
  7. <a class="close" data-delete-feed-id="{{id}}" href="#" role="button" aria-label="{{#t "remove_feed"}}Remove {{display_name}}{{/t}}">×</a>
  8. <a href="{{url}}">
  9. <b>
  10. {{display_name}}
  11. </b>
  12. {{#if header_match}}
  13. <em>{{#t "keyword"}}Keyword:{{/t}} {{header_match}}</em>
  14. {{/if}}
  15. {{#if external_feed_entries_count}}
  16. <em>{{external_feed_entries_count}} {{#t "posts_added"}}Posts Added{{/t}}</em>
  17. {{/if}}
  18. </a>
  19. </li>
  20. {{/each}}
  21. <li>
  22. <a href="#" class="element_toggler add_external_feed_link" aria-expanded='false' role="button" aria-controls="add_external_feed_form">
  23. <i class="icon-rss-add"></i>
  24. {{#t "links.add_external_feed"}}Add External Feed{{/t}}
  25. </a>
  26. </li>
  27. </ul>
  28. <form class="bootstrap-form" id="add_external_feed_form" style="display: none">
  29. <h2>{{#t "add_a_new_feed"}}Add a New Feed{{/t}}</h2>
  30. <label for="external_feed_url">
  31. {{#t "descriptions.add_new_feed"}}
  32. You can automatically add posts from an RSS or Atom feed as announcements for this course.
  33. Just paste the feed URL below and any new entries will be added.
  34. {{/t}}
  35. </label>
  36. <input type="text"
  37. id="external_feed_url"
  38. name="url"
  39. class="input-block-level"
  40. aria-label="{{#t "feed_url_label"}}Feed URL{{/t}}"
  41. placeholder="{{#t "feed_url_label"}}Feed URL{{/t}}">
  42. <div>
  43. <select id="external_feed_verbosity" name="verbosity" class="input-block-level" aria-label="{{#t "options.content_to_post"}}Content to post{{/t}}">
  44. <option>--{{#t "options.content_to_post"}}Content to post{{/t}}--</option>
  45. <option value="full">{{#t "options.full_article"}}Full article{{/t}}</option>
  46. <option value="truncate">{{#t "options.truncated"}}Truncated{{/t}}</option>
  47. <option value="link_only">{{#t "options.link_only"}}Link only{{/t}}</option>
  48. </select>
  49. </div>
  50. <label class="checkbox">
  51. <input id="external_feed_enable_header_match"
  52. class="element_toggler"
  53. aria-controls="header_match_container"
  54. type="checkbox"> {{#t "labels.match_phrase_checkbox"}}Only add posts with a specific phrase in the title{{/t}}
  55. </label>
  56. <div id="header_match_container" style="display:none">
  57. <input id="external_feed_header_match"
  58. type="text"
  59. name="header_match"
  60. class="input-block-level"
  61. aria-label="{{#t "phrase_to_look_for"}}Phrase to look for{{/t}}"
  62. placeholder="{{#t "phrase_to_look_for"}}Phrase to look for{{/t}}">
  63. </div>
  64. <div>
  65. <button type="submit"
  66. data-text-while-loading="{{#t "buttons.adding_feed"}}Adding feed...{{/t}}"
  67. class="btn">{{#t "buttons.add_feed"}}Add Feed{{/t}}</button>
  68. </div>
  69. </form>