<p id="notice"><%= notice %></p>

<h1>Listing Forms</h1>

<table>
  <thead>
    <tr>
      <th colspan="3"></th>
    </tr>
  </thead>

  <tbody>
    <% @forms.each do |form| %>
      <tr>
        <td><%= form.title %></td>
        <td><%= link_to 'Show', form %></td>
        <% if current_user && current_user.admin %>
          <td><%= link_to 'Edit', edit_form_path(form) %></td>
          <td><%= link_to 'Destroy', form, method: :delete, data: { confirm: 'Are you sure?' } %></td>
        <% end %>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<% if current_user && current_user.admin %>
<%= link_to 'New Form', new_form_path %>
<% end %>

<br>

<%= link_to "Logout", destroy_user_session_path, method: :delete, :class => 'navbar-link'  %>

<p id="notice"><%= notice %></p>

<h1>Listing Forms</h1>

<table>
  <thead>
    <tr>
      <th colspan="3"></th>
    </tr>
  </thead>

  <tbody>
    <% @forms.each do |form| %>
      <tr>
        <td><%= form.title %></td>
        <td><%= link_to 'Show', form %></td>
        <% if current_user && current_user.admin %>
          <td><%= link_to 'Edit', edit_form_path(form) %></td>
          <td><%= link_to 'Destroy', form, method: :delete, data: { confirm: 'Are you sure?' } %></td>
        <% end %>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<% if current_user && current_user.admin %>
<%= link_to 'New Form', new_form_path %>
<% end %>

<br>

<% if current_user %>
<%= link_to 'Edit profile', edit_user_registration_path, :class => 'navbar-link' %>
<%= link_to "Logout", destroy_user_session_path, method: :delete, :class => 'navbar-link'  %>
<% end %>
Add link to profile page in forms index
Add link to profile page in forms index
