<% scope = [:users, :show] %>

<% content_for :header do %>
  <h1><%= "#{t_view(:heading, scope)} #{@user.name}" %></h1>
<% end %>

<% content_for :content do %>
  <dl class="dl-horizontal">
    <dt><%= User.human_attribute_name :name %></dt>
    <dd><%= @user.name %></dd>
    <dt><%= User.human_attribute_name :email %></dt>
    <dd><%= @user.email %></dd>
    <dt><%= User.human_attribute_name :location %></dt>
    <dd><%= @user.full_street_address %></dd>
  </dl>
<% end %>

<% scope = [:users, :show] %>

<% content_for :header do %>
  <h1><%= "#{t_view(:heading, scope)} #{@user.name}" %></h1>
<% end %>

<% content_for :content do %>
  <dl class="dl-horizontal">
    <dt><%= User.human_attribute_name :name %></dt>
    <dd><%= @user.name %></dd>
    <% if current_user.admin? %>
      <dt><%= User.human_attribute_name :email %></dt>
      <dd><%= @user.email %></dd>
    <% end %>
    <dt><%= User.human_attribute_name :location %></dt>
    <dd><%= @user.full_street_address %></dd>
  </dl>
<% end %>

Hide user email for non-admins
Hide user email for non-admins
