_assignment.html.erb 888 B

123456789101112131415161718192021222324252627
  1. <div class="panel panel-danger">
  2. <div class="panel-heading">
  3. <%= assignment.name %>
  4. </div>
  5. <div class="panel-body">
  6. <p>
  7. Course: <%= link_to assignment.course.name, assignment.course %>
  8. </p>
  9. <p>
  10. Due at: <%= assignment.due_at %>
  11. </p>
  12. <p>
  13. <%= format_content(assignment.description) %>
  14. </p>
  15. </div>
  16. <div class="panel-footer">
  17. <% if current_user.assignments.include?(assignment) %>
  18. <%= link_to new_assignment_submission_url(assignment), class: 'btn btn-primary' do %>
  19. <%= fa_icon 'file', text: "New Submission" %>
  20. <% end %>
  21. <% elsif assignment.course.users.merge(CourseParticipation.teachers).include?(current_user) %>
  22. <%= link_to assignment_submissions_url(assignment), class: 'btn btn-primary' do %>
  23. <%= fa_icon 'list', text: "View Submissions" %>
  24. <% end %>
  25. <% end %>
  26. </div>
  27. </div>