SubmissionDetailsDialog.handlebars 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <div class="submission_details_dialog">
  2. <h1 class="assignment-name">{{assignment.name}}</h1>
  3. <section class="submission-details">
  4. <form class="submission_details_grade_form form-inline">
  5. <strong><label for="{{label}}">{{#t 'grade_form_label'}}Grade:{{/t}}</label></strong>
  6. {{> grading_box}}
  7. {{#unless isInPastGradingPeriodAndNotAdmin}}
  8. <button style="float: right;" class="btn" type="submit">{{#t "update_grade"}}Update Grade{{/t}}</button>
  9. {{/unless}}
  10. </form>
  11. {{#if speedGraderUrl }}
  12. <a class="more-details-link" target="_blank" href="{{speedGraderUrl}}">{{#t "more_details_in_the_speedgrader"}}More details in the SpeedGrader{{/t}}</a>
  13. {{/if}}
  14. <div>
  15. <h2>
  16. {{#if moreThanOneSubmission}}
  17. <label for="submission_to_view">{{#t "this_was_submitted_multiple_times_choose_a_submission_to_view"}}Submitted multiple times, choose which to view:{{/t}}</label>
  18. <select id="submission_to_view">
  19. {{#each submission_history}}
  20. <option>{{datetimeFormatted submitted_at}} {{#if late}} {{#t "late"}}LATE{{/t}} {{/if}}</option>
  21. {{/each}}
  22. </select>
  23. {{else}}
  24. {{#if submitted_at}}
  25. <strong>{{#t "submitted"}}Submitted:{{/t}} {{datetimeFormatted submitted_at}} {{#if late}} {{#t "late"}}LATE{{/t}} {{/if}}</strong>
  26. {{/if}}
  27. {{/if}}
  28. </h2>
  29. {{#each submission_history}}
  30. {{> submission_detail}}
  31. {{/each}}
  32. {{#if rubric_assessment}}
  33. <div class="rubric-link"><a class="rubric" href="{{speedGraderUrl}}">{{#t "view_rubric_assessment_in_the_speedgrader"}}View Rubric Assessment in the SpeedGrader{{/t}}</a></div>
  34. {{/if}}
  35. </div>
  36. </section>
  37. <section>
  38. {{#if loading}}
  39. <h1>{{#t "loading_comments"}}Loading comments...{{/t}}</h1>
  40. {{else}}
  41. {{#if submission_comments}}
  42. <h1>{{#t "comments"}}Comments{{/t}}</h1>
  43. <div class="submission_details_comments">
  44. {{#each submission_comments}}
  45. <article class="comment clearfix">
  46. {{friendlyDatetime created_at pubdate=true}}
  47. {{>avatar author}}
  48. <div class="middle">
  49. <address class="vcard">
  50. <a class="fn url" href="{{url}}">{{author_name}}</a>
  51. </address>
  52. <div>
  53. {{newlinesToBreak comment}}
  54. </div>
  55. {{#if media_comment}}
  56. <a data-media_comment_id="{{media_comment.media_id}}" data-media_comment_type="{{media_comment.media_type}}" href="{{media_comment.url}}" class="play_comment_link media-comment instructure_inline_media_comment" >{{#t "links.click_to_view"}}click here to view{{/t}}</a>
  57. {{/if}}
  58. <div class="comment_attachments">
  59. {{#each attachments}}
  60. <div><a href="{{url}}" class="{{mimeClass content-type}}" title="{{filename}}">{{display_name}}</a></div>
  61. {{/each}}
  62. </div>
  63. </div>
  64. </article>
  65. {{/each}}
  66. </div>
  67. {{/if}}
  68. {{/if}}
  69. </section>
  70. <form class="submission_details_add_comment_form clearfix">
  71. <label for="add_a_comment">{{#t "add_a_comment"}}Add a comment{{/t}}</label>
  72. <textarea id="add_a_comment" name="comment[text_comment]"></textarea>
  73. {{#if assignment.group_category_id}}
  74. <span id="group-comment-container">
  75. {{checkbox "comment.group_comment" id="group_comment"}}
  76. <label for="group_comment">{{#t "labels.group_comment"}}Send Comment to the Whole Group{{/t}}</label>
  77. </span>
  78. {{/if}}
  79. <button class="btn" type="submit">{{#t "post_comment"}}Post Comment{{/t}}</button>
  80. </form>
  81. </div>