12345678910111213141516171819202122232425262728293031323334353637 |
- <%
- # Copyright (C) 2011 - 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/>.
- %>
- <% account_user ||= nil %>
- <li class="user" id="enrollment_<%= account_user ? account_user.id : 'blank' %>"<%= ' style="display: none;"' unless account_user %>>
- <a href="<%= user_url(account_user ? account_user.user_id : '{{ user_id }}') %>" class="user_name name"><%= account_user.try(:user).try(:name) %></a>
- <% if !account_user || can_do(account_user, @current_user, :destroy) %>
- <a
- href="<%= account_remove_account_user_url(@context.id, account_user ? account_user.id : '{{ id }}') %>"
- class="remove_account_user_link no-hover"
- title="{{#t}}Remove this admin{{/t}}"
- >
- <i aria-hidden="true" class="icon-end standalone-icon"></i>
- <span class="screenreader-only">
- <%= t("Remove %{name} as an admin", :name => account_user.try(:user).try(:name)) %>
- </span>
- </a>
- <% end -%>
- <span class="membership_type"><%= account_user.try(:readable_type) %></span>
- <span class="email"><%= account_user.try(:user).try(:email) %></span>
- </li>
|