peer_review_assignment.mustache 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <%
  2. # Copyright (C) 2011 - present Instructure, Inc.
  3. #
  4. # This file is part of Canvas.
  5. #
  6. # Canvas is free software: you can redistribute it and/or modify it under
  7. # the terms of the GNU Affero General Public License as published by the Free
  8. # Software Foundation, version 3 of the License.
  9. #
  10. # Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
  11. # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  12. # A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
  13. # details.
  14. #
  15. # You should have received a copy of the GNU Affero General Public License along
  16. # with this program. If not, see <http://www.gnu.org/licenses/>.
  17. %>
  18. <li class="peer_review <%= request.try_rescue(:workflow_state) || 'assigned' %>" id="review_request_<%= request ? request.id : 'blank' %>" style="<%= hidden unless request %>">
  19. <span style="float: left;">
  20. <% if request && request.completed? %>
  21. <i class="icon-check" aria-hidden="true"></i>
  22. <% end %>
  23. <% if (request && !request.completed?) || request.nil? %>
  24. <i class="icon-warning" aria-hidden="true"></i>
  25. <% end %>
  26. <a href="<%= context_url(@context, :context_assignment_submission_url, @assignment.id, request ? request.asset.user_id : '{{ user_id }}') %>">
  27. <span class="asset_user_name"><%= request.try_rescue(:asset).try_rescue(:user).try_rescue(:last_name_first) || nbsp %></span>
  28. </a>
  29. </span>
  30. <span class="user_id" style="display: none;"><%= request.try_rescue(:asset).try_rescue(:user_id) || nbsp %></span>
  31. <div style="float: right;" class="review_links">
  32. <% user = request.try_rescue(:assessor).try_rescue(:name)
  33. user ||= t 'titles.user_default', "User"
  34. reminder = t 'titles.remind_reviewer', "Remind %{user} about Assessment", :user => user
  35. reminder = t 'titles.remind_reviewier_with_last_notification', "Remind %{user} about Assessment, last notified %{at}", :user => user, :at => datetime_string(request.updated_at) if request && request.assigned?
  36. %>
  37. <a
  38. class="remind_peer_review_link no-hover"
  39. style="<%= hidden if request && request.completed? %>"
  40. href="<%= context_url(@context, :context_assignment_remind_peer_review_url, @assignment.id, request ? request.id : '{{ id }}') %>">
  41. <i class="icon-alerts" aria-hidden="true" title="<%= reminder %>"></i>
  42. </a>
  43. <a
  44. class="delete_review_link no-hover"
  45. href="<%= context_url(@context, :context_assignment_delete_peer_review_url, @assignment.id, request ? request.id : '{{ id }}') %>">
  46. <i class="icon-trash" aria-hidden="true" title="{{#t}}Delete{{/t}}"></i>
  47. </a>
  48. </div>
  49. <div class="clear"></div>
  50. </li>