<h1>Listing events</h1>

<h2>Category: <%= @category.to_s %></h2>

<div style="float:left">
  <table>
    <tr>
      <th>Name</th>
      <th>Description</th>
      <th>Position</th>
      <th></th>
      <th></th>
      <th></th>
    </tr>

    <% @events.each do |event| %>
      <tr>
        <td><%= event.name %></td>
        <td><%= event.description %></td>
        <td><%= event.position %></td>
        <td><%= link_to 'Event Choices', event_event_choices_path(event) %></td>
        <td><%= link_to 'Edit', edit_event_path(event) %></td>
        <td><%= link_to 'Destroy', event, method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
      <% event.event_choices.each do |event_choice| %>
        <tr>
          <th>Event Choice</th>
          <td><%= event_choice.label %></td>
          <td><%= event_choice.cell_type %></td>
          <td><%= event_choice.position %></td>
        </tr>
      <% end %>
    <% end %>
  </table>

  <br />
  <h3>New Event</h3>
  <%= render :partial => "form" %>
</div>

<div style="float: right">
  <%= render :partial => "/attending/preview" %>
</div>

<h1>Listing events</h1>

<h2>Category: <%= @category.to_s %></h2>

<div style="float:left">
  <table>
    <tr>
      <th>Name</th>
      <th>Description</th>
      <th>Position</th>
      <th></th>
      <th></th>
      <th></th>
    </tr>

    <% @events.each do |event| %>
      <tr>
        <td><%= event.name %></td>
        <td><%= event.description %></td>
        <td><%= event.position %></td>
        <td><%= link_to 'Event Choices', event_event_choices_path(event) %></td>
        <td><%= link_to 'Edit', edit_event_path(event) %></td>
        <td><%= link_to 'Destroy', event, method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
      <% event.event_choices.each do |event_choice| %>
        <tr>
          <th>Event Choice</th>
          <td><%= event_choice.label %></td>
          <td><%= event_choice.cell_type %></td>
          <td><%= event_choice.position %></td>
        </tr>
      <% end %>
    <% end %>
  </table>

  <br />
  <h3>New Event</h3>
  <%= render :partial => "form" %>
  <%= link_to 'Back', categories_path %>
</div>

<div style="float: right">
  <%= render :partial => "/attending/preview" %>
</div>

Add link from Events page to Categories page
Add link from Events page to Categories page
