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

<h1>Templates</h1>

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

  <tbody>
    <% @templates.each do |template| %>
      <tr>
        <td><%= template.title %></td>
        <td><%= template.desc %></td>
        <td><%= link_to 'Show', template %></td>
        <td><%= link_to 'Edit', edit_template_path(template) %></td>
        <td><%= link_to 'Destroy', template, method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to 'New Template', new_template_path %>
<% unless current_user %>   <%= link_to "Sign in with Facebook", user_facebook_omniauth_authorize_path %><% else %>  <%= current_user[:name] %>  <%= link_to "Logout", destroy_user_session_path, method: :delete %><% end %>