canvas-lms/app/views/profile/show.html.erb

21 lines
1.0 KiB
Plaintext

<% content_for :page_title, @user_data[:short_name] %>
<%= render 'shared/profile' %>
<% content_for :right_side do %>
<div class="rs-margin-all">
<% if @user_data[:can_edit] %>
<button data-event="editProfile" class="hide-if-editing btn button-sidebar-wide"><i class="icon-edit"></i> <%= t('edit_profile', 'Edit Profile') %></button>
<button data-event="cancelEditProfile" class="show-if-editing btn button-sidebar-wide"><i class="icon-edit"></i> <%= t('cancel_editing', 'Cancel Editing') %></button>
<% end %>
<% if can_do(@domain_root_account, @current_user, :manage) %>
<h1 class="h2 right-side-h2-border"><%= t :administration, 'Administration' %></h1>
<div><a href="<%= user_path(@user.id) %>"><%= t('links.user_account_details', %{Account Details}) %></a></div>
<% if @user != @current_user %>
<div><a href="<%= context_url(@user.profile, :context_url, :become_user_id => @user.id) %>"> <%= t('become', 'Become') %></a></div>
<% end %>
<% end %>
</div>
<% end %>