Syllabus.handlebars 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <div id="syllabus_links">
  2. {{#if overrides_present}}
  3. <a id="toggle_special_dates_in_syllabus" class="shown" href="#">
  4. <span class="hide">{{#t "syllabus.hide_specific_dates"}}Hide section, group, and person specific dates{{/t}}</span>
  5. <span class="show">{{#t "syllabus.show_specific_dates"}}Show section, group, and person specific dates{{/t}}</span>
  6. </a>
  7. {{else}}
  8. &nbsp;
  9. {{/if}}
  10. </div>
  11. <table id="syllabus" class="ic-Table ic-Table--condensed">
  12. <thead>
  13. <tr>
  14. <th scope="col" style="width: 25%;">{{#t "headers.date"}}Date{{/t}}</th>
  15. <th scope="col" style="width: 75%;">
  16. <div style="float: right;"></div>
  17. {{#t "headers.details"}}Details{{/t}}
  18. </th>
  19. </tr>
  20. </thead>
  21. <tbody>
  22. {{#each dates}}
  23. <tr class="date{{#if passed}} date_passed{{/if}}{{#if date}} events_{{strftime date "%Y_%m_%d"}}{{/if}}">
  24. <td scope="row" valign="top" class="day_date" data-date="{{#if date}}{{strftime date "%Y_%m_%d"}}{{/if}}">
  25. {{#if date}}
  26. {{tDateToString date "medium_with_weekday"}}
  27. {{/if}}
  28. </td>
  29. <td class="details">
  30. <table class="detail_list">
  31. {{#each events}}
  32. <tr class="syllabus_{{type}} related-{{related_id}}{{#if override}} special_date{{/if}}">
  33. <td class="name{{#unless last}} not_last{{/unless}}">
  34. {{#ifEqual type 'assignment'}}
  35. {{addIcon 'assignment'}}
  36. {{else}}
  37. {{addIcon 'calendar-month'}}
  38. {{/ifEqual}}
  39. {{#if html_url}}
  40. <a href="{{html_url}}">{{title}}</a>
  41. {{else}}
  42. {{title}}
  43. {{/if}}
  44. {{#if override}}
  45. <div class="special_date_title">({{override.title}})</div>
  46. {{/if}}
  47. </td>
  48. <td class="dates{{#unless last}} not_last{{/unless}}">
  49. {{#if start_at}}
  50. {{#if due_at}}
  51. {{t "due by"}} <span {{contextSensitiveDatetimeTitle (unfudge due_at)}} >{{tTimeHours due_at}}</span>
  52. {{else}}
  53. <span {{contextSensitiveDatetimeTitle (unfudge start_at)}} >{{tTimeHours start_at}}</span>
  54. {{#unless same_time}}
  55. {{t "to" }}
  56. <span {{contextSensitiveDatetimeTitle (unfudge end_at)}} >
  57. {{#if same_day}}
  58. {{tTimeHours end_at}}
  59. {{else}}
  60. {{tEventToString end_at 'short' 'tiny_on_the_hour'}}
  61. {{/if}}
  62. </span>
  63. {{/unless}}
  64. {{/if}}
  65. {{else}}
  66. &nbsp;
  67. {{/if}}
  68. </td>
  69. </tr>
  70. {{/each}}
  71. </table>
  72. </td>
  73. </tr>
  74. {{/each}}
  75. </tbody>
  76. </table>