{{#if controller.visible}}
<div class="card-content">

  <a href={{user.path}} {{action "showUser"}}>{{bound-avatar avatar "huge"}}</a>

  <div class="names">
    <span>
      <h1 class="{{staff}} {{new_user}}">
        <a href={{user.path}} {{action "showUser"}}>{{username}} {{user-status user currentUser=currentUser}}</a>
      </h1>

      {{#if user.name}}
        <h2>{{user.name}}</h2>
      {{/if}}

      {{#if user.title}}
        <h2>{{user.title}}</h2>
      {{/if}}

      {{plugin-outlet "user-card-post-names"}}
    </span>
  </div>

  <ul class="usercard-controls">
    {{#if user.can_send_private_message_to_user}}
      <li><a class='btn btn-primary' {{action "composePrivateMessage" user post}}>{{fa-icon "envelope"}}{{i18n 'user.private_message'}}</a></li>
    {{/if}}

    {{#if showFilter}}
      <li><a class='btn' href {{action "togglePosts" user}}>{{fa-icon "filter"}}{{i18n 'topic.filter_to' username=username post_count=topicPostCount}}</a></li>
    {{/if}}

    {{#if hasUserFilters}}
      <li><a class='btn' href {{action "cancelFilter"}}>{{fa-icon "times"}}{{i18n 'topic.filters.cancel'}}</a></li>
    {{/if}}

    {{#if showDelete}}
      <li><a class='btn btn-danger' href {{action "deleteUser" user}}>{{fa-icon "exclamation-triangle"}}{{i18n 'admin.user.delete'}}</a></li>
    {{/if}}
  </ul>

  {{#if isSuspended}}
    <div class='suspended'>
      {{fa-icon "ban"}}
      <b>{{i18n 'user.suspended_notice' date=user.suspendedTillDate}}</b><br/>
      <b>{{i18n 'user.suspended_reason'}}</b> {{user.suspend_reason}}
    </div>
  {{else}}
    {{#if user.bio_cooked}}<div class='bio'>{{text-overflow class="overflow" text=user.bio_excerpt}}</div>{{/if}}
  {{/if}}

  {{#if user.card_badge}}
    {{#link-to 'badges.show' user.card_badge class="card-badge" title=user.card_badge.name}}
      {{icon-or-image user.card_badge.image title=user.card_badge.name}}
    {{/link-to}}
  {{/if}}

  {{#if user}}
    <div class="metadata">
      {{#if user.last_posted_at}}
        <h3><span class='desc'>{{i18n 'last_post'}}</span> {{format-date user.last_posted_at leaveAgo="true"}}</h3>
      {{/if}}
      <h3><span class='desc'>{{i18n 'joined'}}</span> {{format-date user.created_at leaveAgo="true"}}</h3>
      {{plugin-outlet "user-card-metadata"}}
    </div>
  {{/if}}

  {{#if showBadges}}
    <div class="badge-section">
      {{#each ub in user.featured_user_badges}}
        {{user-badge badge=ub.badge}}
      {{/each}}
      {{#if showMoreBadges}}
        {{#link-to 'user.badges' user class="btn more-user-badges"}}
          {{i18n 'badges.more_badges' count=moreBadgesCount}}
        {{/link-to}}
      {{/if}}
    </div>
  {{/if}}
</div>
{{/if}}
