canvas-lms/app/views/self_enrollments/_successfully_enrolled.html...

45 lines
2.1 KiB
Plaintext

<%
# Copyright (C) 2012 - present Instructure, Inc.
#
# This file is part of Canvas.
#
# Canvas is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation, version 3 of the License.
#
# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
%>
<div id="enroll_form">
<p><%= mt :already_enrolled, "You have successfully enrolled in **%{course}**.", :course => @course.name %></p>
<% if @course.user_is_student?(@current_user)
# i.e. *current* student, the course has started %>
<%= registration_summary %>
<div class="ic-Self-enrollment-footer-modal-layout">
<div class="ic-Self-enrollment-footer">
<div class="ic-Self-enrollment-footer__Primary">
<%= @extra_actions %>
<a class="btn" href="<%= dashboard_url(:registration_success => params[:just_created]) %>" target="_top"><%= t "buttons.go_to_dashboard", "Go to your Dashboard" %></a>
<a class="btn btn-primary" href="<%= course_url(@course, :registration_success => params[:just_created]) %>" target="_top"><%= t "buttons.go_to_course", "Go to the Course" %></a>
</div>
</div>
</div>
<% else %>
<%= registration_summary || content_tag(:p, t(:not_available_yet, "We'll send you an email shortly before the course begins.")) %>
<div class="ic-Self-enrollment-footer-modal-layout">
<div class="ic-Self-enrollment-footer">
<div class="ic-Self-enrollment-footer__Primary">
<%= @extra_actions %>
<a class="btn btn-primary" href="<%= dashboard_url(:registration_success => params[:just_created]) %>" target="_top"><%= t "buttons.go_to_dashboard", "Go to your Dashboard" %></a>
</div>
</div>
</div>
<% end %>
</div>