education/classroom

View on GitHub
app/views/shared/_open_on_assistant_modal.html.erb

Summary

Maintainability
Test Coverage
<% if enabled %>
  <iframe id="js-hidden-iframe" src="about:blank" style="display:none"></iframe>
<% end %>
<div class="mt-3 pr-2">
  <details class="dropdown details-reset details-overlay d-inline-block">
    <summary
      id="<%=  enabled ? "js-download-repos-btn" : "" %>"
      class="btn <%= enabled ? "" : "disabled tooltipped tooltipped-n" %>"
      aria-label="There are no repositories to download for this assignment."
      aria-haspopup="true">
      Download Repositories
      <div class="dropdown-caret"></div>
    </summary>

    <% if enabled %>
    <div class="dropdown-menu dropdown-menu-sw assistant-modal-dropdown-menu ">
      <div id="js-modal-download-repos">
        <div class="py-2 px-3">
            <h4 class="mb-3">Download Student Repositories</h4>
            <p class="text-gray mb-0">Open Assignment in Classroom Assistant to clone student submissions.</p>
        </div>
        <a id="js-assistant-open-btn" href="<%= assistant_url %>" class="btn btn-outline desktop-modal-btn tooltipped tooltipped-s mt-2 text-center assistant-modal-btn" aria-label="Open Assignment in Classroom Assistant">
          Open in Classroom Assistant
        </a>
      </div>

      <div id="js-modal-launching" class="py-2 px-3" style="display:none">
        <h4 class="mb-3 loading">Launching Classroom Assistant</h4>
        <p class="text-gray">If nothing happens, <a href="http://classroom.github.com/assistant">download Classroom Assistant</a> and try again.</p>
      </div>
    </div>
    <% end %>
  </details>
</div>