<div class="page-header">
  <h1><%= @topic.name %></h1>
</div>

<div class="well">
  <% if @topic.children.any? %>
    <strong><%= Topic.human_attribute_name :children %>:</strong>
    <ul>
      <% @topic.children.each do |subtopic| %>
        <li>
          <%= link_to subtopic.name, subtopic %>
        </li>
      <% end %>
    </ul>
  <% end %>

  <% if @topic.ancestors.any? %>
    <strong><%= Topic.human_attribute_name :ancestors %>:</strong>
    <ul>
      <% @topic.ancestors.each do |ancestor| %>
        <li>
          <%= link_to ancestor.name, ancestor %>
        </li>
      <% end %>
    </ul>
  <% end %>
</div>

<h2><%= Issue.model_name.human count: 2 %></h2>
<%= render partial: "shared/issue_table", locals: { issues: @topic.issues } %>

<h2><%= Promise.model_name.human count: 2 %></h2>
<%= render partial: "shared/promises_table", locals: { promises: @topic.promises } %>



<div class="page-header">
  <h1><%= @topic.name %></h1>
</div>

<div class="well">
  <% if @topic.children.any? %>
    <strong><%= Topic.human_attribute_name :children %>:</strong>
    <ul>
      <% @topic.children.each do |subtopic| %>
        <li>
          <%= link_to subtopic.name, subtopic %>
        </li>
      <% end %>
    </ul>
  <% end %>

  <% if @topic.ancestors.any? %>
    <strong><%= Topic.human_attribute_name :ancestors %>:</strong>
    <ul>
      <% @topic.ancestors.each do |ancestor| %>
        <li>
          <%= link_to ancestor.name, ancestor %>
        </li>
      <% end %>
    </ul>
  <% end %>
</div>

<h2><%= Promise.model_name.human count: 2 %></h2>
<%= render partial: "shared/promises_table", locals: { promises: @topic.promises } %>

<h2><%= Issue.model_name.human count: 2 %></h2>
<%= render partial: "shared/issue_table", locals: { issues: @topic.issues } %>


Move promises to the top of the topic page.
Move promises to the top of the topic page.
