AssignmentListItem.handlebars 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <div
  2. id="assignment_{{id}}"
  3. class="ig-row {{#ifAll canManage published}}ig-published{{/ifAll}} {{#if is_master_course_master_content}}is-master{{/if}}"
  4. data-item-id="{{labelId}}"
  5. >
  6. <div class="ig-row__layout">
  7. {{#if canManage}}
  8. <div aria-hidden='true' class="ig-handle">
  9. <span class="draggable-handle{{#unless canMove}} disabled{{/unless}}">
  10. <i class="icon-drag-handle"></i>
  11. </span>
  12. </div>
  13. {{/if}}
  14. <div class="ig-type-icon">
  15. <i aria-hidden="true" class='icon-{{iconType}}'></i>
  16. </div>
  17. <div class="ig-info">
  18. <a href="{{htmlUrl}}" class="ig-title">
  19. {{name}}
  20. </a>
  21. <div class="ig-details">
  22. {{#if canManage}}
  23. {{#if has_modules}}
  24. <div class="ig-details__item ig-details__item--wrap-text modules">
  25. {{#ifEqual module_count 1}}
  26. {{module_name}} {{#t}}Module{{/t}}
  27. {{else}}
  28. <a
  29. title='{{joined_names}}'
  30. class="tooltip_link"
  31. data-tooltip-selector="#module_tooltip_{{labelId}}"
  32. >{{#t}}Multiple Modules{{/t}}</a>
  33. {{/ifEqual}}
  34. <div id="module_tooltip_{{labelId}}" style="display:none;">
  35. {{#each modules}}
  36. <span>{{this}}</span>
  37. {{/each}}
  38. </div>
  39. </div>
  40. {{/if}}
  41. {{/if}}
  42. {{#if showAvailability}}
  43. <div class="ig-details__item assignment-date-available" data-view="date-available">
  44. </div>
  45. {{/if}}
  46. {{#if showDueDate}}
  47. <div class="ig-details__item assignment-date-due" data-view="date-due">
  48. </div>
  49. {{/if}}
  50. {{#if pointsPossible}}
  51. <div class="ig-details__item js-score">
  52. <span class="screenreader-only">
  53. {{#t}}{{n pointsPossible}} Points Possible{{/t}}
  54. </span>
  55. <span class="non-screenreader" aria-hidden="true">
  56. {{#t}}{{n pointsPossible}} pts{{/t}}
  57. </span>
  58. </div>
  59. {{else}}
  60. <span class="js-score screenreader-only">
  61. {{#t}}No Points Possible{{/t}}
  62. </span>
  63. {{/if}}
  64. </div>
  65. </div>
  66. {{#if canManage}}
  67. <div class="ig-admin">
  68. {{#if cyoe.isTrigger}}
  69. <a href="{{htmlEditUrl}}?return_to={{return_to}}#mastery-paths-editor" title="{{#t}}Edit Mastery Paths for {{name}}{{/t}}">{{#t}}Mastery Paths{{/t}}</a>
  70. {{/if}}
  71. {{#if cyoe.isReleased}}
  72. <span class="pill mastery-path-icon" aria-hidden="true" data-tooltip title="{{#t}}Released by Mastery Path: {{cyoe.releasedLabel}}{{/t}}">
  73. <i class="icon-mastery-path"></i>{{cyoe.releasedLabel}}
  74. </span>
  75. {{/if}}
  76. <span class="sis-button" data-view="sis-button"></span>
  77. <span class="lock-icon" data-view="lock-icon"></span>
  78. <span class="publish-icon" data-view="publish-icon"></span>
  79. <div class="inline-block">
  80. <a
  81. class="al-trigger al-trigger-gray"
  82. id="assign_{{id}}_manage_link"
  83. role="button"
  84. tabindex="0"
  85. >
  86. <i class="icon-settings"></i><i class="icon-mini-arrow-down"></i>
  87. </a>
  88. <ul
  89. id="assignment_{{id}}_settings_list"
  90. class="al-options"
  91. role="menu"
  92. >
  93. <li>
  94. <a
  95. class="edit_assignment icon-edit"
  96. id="assignment_{{id}}_settings_edit_item"
  97. aria-label="{{#t}}Edit Assignment {{name}}{{/t}}"
  98. data-focus-returns-to="assign_{{id}}_manage_link"
  99. >{{#t}}Edit{{/t}}</a>
  100. </li>
  101. {{#if canDuplicate}}
  102. <li>
  103. <a
  104. class="duplicate_assignment icon-copy-course"
  105. id="assignment_{{id}}_settings_duplicate_item"
  106. aria-label="{{#t}}Duplicate Assignment {{name}}{{/t}}"
  107. data-focus-returns-to"assign_{{id}}_manage_link"
  108. >{{#t}}Duplicate{{/t}}</a>
  109. </li>
  110. {{/if}}
  111. {{#if canMove}}
  112. <li>
  113. <a
  114. class="move_assignment icon-updown"
  115. id="assignment_{{id}}_settings_move_item"
  116. aria-label='{{#t}}Move Assignment {{name}}{{/t}}'
  117. data-focus-returns-to="assign_{{id}}_manage_link"
  118. >{{#t}}Move To…{{/t}}</a>
  119. </li>
  120. {{else}}
  121. <li>
  122. <a
  123. class="move_assignment icon-updown disabled"
  124. id="assignment_{{id}}_settings_move_item"
  125. aria-label='{{#t}}Move Assignment {{name}}{{/t}}'
  126. aria-disabled=true
  127. >{{#t}}Move To…{{/t}}</a>
  128. </li>
  129. {{/if}}
  130. {{#if cyoe.isCyoeAble}}
  131. <li>
  132. <a
  133. href="{{htmlEditUrl}}?return_to={{return_to}}#mastery-paths-editor"
  134. class="edit_mastery_paths icon-mastery-path"
  135. id="assignment_{{id}}_settings_edit_item_mastery_paths"
  136. aria-label="{{#t}}Edit Assignment {{name}} Mastery Paths{{/t}}"
  137. data-focus-returns-to="assign_{{id}}_manage_link"
  138. title="{{#t}}Edit Mastery Paths for {{name}}{{/t}}"
  139. >{{#t}}Mastery Paths{{/t}}</a>
  140. </li>
  141. {{/if}}
  142. {{#unless is_locked}}
  143. <li>
  144. {{#if canDelete}}
  145. <a
  146. class="delete_assignment icon-trash"
  147. id="assignment_{{id}}_settings_delete_item"
  148. aria-label="{{#t}}Delete Assignment {{name}}{{/t}}"
  149. data-focus-returns-to="assign_{{id}}_manage_link"
  150. >{{#t "delete"}}Delete{{/t}}</a>
  151. {{else}}
  152. <a
  153. class="delete_assignment icon-trash disabled"
  154. id="assignment_{{id}}_settings_delete_item"
  155. aria-label="{{#t}}Delete Assignment {{name}}{{/t}}"
  156. aria-disabled=true
  157. >{{#t "delete"}}Delete{{/t}}</a>
  158. {{/if}}
  159. </li>
  160. {{/unless}}
  161. {{>ExternalTools/external_tools_menu menu_tools}}
  162. </ul>
  163. </div>
  164. </div>
  165. </div>
  166. <form data-view="edit-assignment" class="form-dialog"></form>
  167. {{/if}}
  168. </div>