libertarian-party/partynest

View on GitHub
app/views/staffs/accounts/show.html.erb

Summary

Maintainability
Test Coverage
<div class="container">
  <%= nav_breadcrumb(
    [translate(:staff_services), staff_root_path],
    [Account.model_name.human(count: 0), staff_accounts_path],
    @account.nickname,
  ) %>

  <%= render partial: 'nav_tabs',
             locals: { account: @account, tab: :overview } %>

  <% if @account.superuser? %>
    <div>
      <span class="badge badge-primary">
        <%= translate :superuser %>
      </span>
    </div>
  <% end %>

  <dl class="mt-3">
    <dt><%= Account.human_attribute_name :nickname %></dt>
    <dd><%= account_link_or_none @account %></dd>

    <dt><%= Account.human_attribute_name :public_name %></dt>
    <dd><%= @account.public_name %></dd>

    <dt><%= Account.human_attribute_name :person %></dt>
    <dd><%= staff_person_link_or_none @account.person %></dd>
  </dl>
</div>