education/classroom

View on GitHub
app/views/assignment_invitations/show.html.erb

Summary

Maintainability
Test Coverage
<%= render 'organizations/organization_invitation_banner' %>

<div class="site-content">
  <div class="site-content-cap">
    <h2 class="site-content-heading">
      <span class="assignment-icon assignment-icon-individual">
        <%= octicon 'person', height: 22 %>
      </span>
      Accept the <strong><%= current_assignment.title %></strong> assignment
    </h2>
  </div>
</div>

<div class="site-content-body">
  <%= form_tag({ controller: :assignment_invitations, action: :accept }, method: :patch) do %>
    <div class="markdown-body">
      <p>
        Accepting this assignment will give you access to the <strong><%= "#{current_assignment.slug}-#{current_user.github_user.login(use_cache: false)}" %></strong>
        repository in the <%= link_to "@#{organization.github_organization.login}", organization.github_organization.html_url %> organization on GitHub.
      </p>
    </div>

    <div class="form-actions">
      <% loader = ' js-navigation' %>
      <%= submit_tag 'Accept this assignment', class: 'btn btn-primary' + loader %>
    </div>
  <% end %>
</div>