<div class="editors">
  <div class="content">
    <%= render partial: "shared/editor", locals: { editor: @editor } %>

    <p>
      <strong>Type:</strong>
      <%= @editor.kind %>
    </p>

    <p>
      <strong>Title:</strong>
      <%= @editor.title %>
    </p>

    <p>
      <strong>First name:</strong>
      <%= @editor.first_name %>
    </p>

    <p>
      <strong>Last name:</strong>
      <%= @editor.last_name %>
    </p>

    <p>
      <strong>Login:</strong>
      <%= @editor.login %>
    </p>

    <p>
      <strong>Email:</strong>
      <%= @editor.email %>
    </p>

    <p>
    <strong>Buddy:</strong>
    <% if @editor.buddy.present? %>
      <%= "#{@editor.buddy.full_name} (@#{@editor.buddy.login})" %>
    <% else %>
      <i>None</i>
    <% end %>
    </p>

    <p>
      <strong>Avatar url:</strong>
      <%= @editor.avatar_url %>
    </p>

    <p>
      <strong>Categories:</strong>
      <%= @editor.category_list %>
    </p>

    <p>
      <strong>Url:</strong>
      <%= @editor.url %>
    </p>

    <p>
      <strong>Tracks:</strong>
      <ul>
      <% @editor.tracks.each do |t| %>
        <li><%= t.name %></li>
      <% end %>
      </ul>
    </p>

    <p>
      <strong>Description:</strong>
      <%= @editor.description.html_safe %>
    </p>

    <p>
      <strong>Max number of assignments:</strong>
      <%= @editor.max_assignments %>
    </p>

    <div class="links">
      <%= link_to 'Edit', edit_editor_path(@editor) %> |
      <% if @editor.pending? %>
        <%= link_to 'List of pending editors', onboardings_path(anchor: 'editors') %>
      <% else %>
        <%= link_to 'List', editors_path %>
      <% end %>
    </div>
  </div>
</div>
