<div class="row">
  <div class="col-12">
    <h2 class="d-inline">
      <%= @user.name %><%= link_to "@#{@user.username}", @user.path, class: "ml-2", target: "_blank", rel: "noopener" %>
    </h2>
    <a href="<%= edit_internal_user_path(@user) %>" class="btn btn-primary float-right">Manage User</a>
    <p class="font-italic">Member since <%= @user.created_at.strftime("%b %e '%y") %></p>
  </div>
  <div class="col-12">
    <h2>General Info</h2>
    <dl>
      <dt>ID:</dt>
      <dd><%= @user.id %></span></dd>
      <dt>Username:</dt>
      <dd><%= @user.username %></dd>
      <dt>Name:</dt>
      <dd><%= @user.name %></dd>
      <dt>Email:</dt>
      <dd><%= @user.email %></dd>
      <dt>Twitter:</dt>
      <% if @user.twitter_username %>
        <dd><%= link_to @user.twitter_username, "https://twitter.com/#{@user.twitter_username}" %></dd>
      <% else %>
        <dd>N/A</dd>
      <% end %>
      <dt>GitHub:</dt>
      <% if @user.github_username %>
        <dd><%= link_to @user.github_username, "https://github.com/#{@user.github_username}" %></dd>
      <% else %>
        <dd>N/A</dd>
      <% end %>
      <dt>Sustaining Member:</dt>
      <dd><%= @user.a_sustaining_member? %></dd>
      <% if @user.a_sustaining_member? %>
        <dt>Monthly Dues:</dt>
        <dd><%= @user.monthly_dues %></dd>
        <dt>25% Off Coupon:</dt>
        <dd><%= CouponGenerator.new(current_user.id, "member_discount").generate %> || "N/A" </dd>
        <dt>1x Gift:</dt>
        <dd><%= CouponGenerator.new(current_user.id, "tee_pack").generate %> || "N/A" </dd>
      <% end %>
    </dl>
  </div>
  </p>
</div>

<%= render "activity" %>
<%= render "credits" %>
<%= render "notes" %>
<%= render "user_organizations" %>
<%= render "email_tools" %>
