summaryrefslogtreecommitdiff
path: root/app/views/pages/index.html.erb
blob: da67871c3c33a4a8c8151132520afaefce3cc267 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<h1>Pages</h1>

<table>
  <tr>
    <th>Node</th>
    <th>Title</th>
  </tr>

<% for page in @pages %>
  <tr>
    <td><%=h page.node_id %></td>
    <td><%=h page.title %></td>
    <td><%= link_to 'Show', content_path(:page_path => page.node.unique_path) %></td>
    <td><%= link_to 'Edit', edit_page_path(page) %></td>
    <td><%= button_to page, method: :delete, form: { data: { confirm: 'Are you sure?' }, class: 'button_to destructive' } do %>
      <%= icon("trash", library: "tabler", "aria-hidden": true) %> Destroy
    <% end %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New page', new_page_path %>