summaryrefslogtreecommitdiff
path: root/app/views/admin/_drafts.html.erb
blob: a35b0ab8d85a873136d54e6e5d6550a9ff6e536d (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
25
<h2>Drafts (<%= @drafts.size %>)</h2>
<div id="draft_list">
  <table>
    <tr class="header">
      <th>ID</th>
      <th>Title</th>
      <th>Path</th>
      <th>author</th>
      <th></th>
    </tr>
    <% @drafts.each do |draft| %>
    <tr>
      <td><%= draft.id %></td>
      <td><%= draft.title %></td>
      <td><%= draft.node.unique_name %></td>
      <td><%= draft.user.login rescue "" %></td>
      <td class="actions">
        <%= link_to 'Show', node_path(draft.node) %>
        <%= link_to "Revisions", revision_path(draft.node.id) %>
        <%= button_to "Publish", publish_node_path(draft.node), method: :put, form: { data: { confirm: "Do you really want to publish?" } } %>
      </td>
    </tr>
    <% end %>
  </table>
</div>