diff options
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/nodes/show.html.erb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/app/views/nodes/show.html.erb b/app/views/nodes/show.html.erb index c533a55..d63df86 100644 --- a/app/views/nodes/show.html.erb +++ b/app/views/nodes/show.html.erb | |||
| @@ -12,6 +12,23 @@ | |||
| 12 | <td class="description">Public Link</td> | 12 | <td class="description">Public Link</td> |
| 13 | <td><%= link_to @page.public_link, content_url(@node.unique_path) %></td> | 13 | <td><%= link_to @page.public_link, content_url(@node.unique_path) %></td> |
| 14 | </tr> | 14 | </tr> |
| 15 | <% if @node.draft %> | ||
| 16 | <tr> | ||
| 17 | <td class="description">Admin Preview</td> | ||
| 18 | <td><%= link_to preview_page_path(@node.draft), preview_page_path(@node.draft) %></td> | ||
| 19 | </tr> | ||
| 20 | <tr> | ||
| 21 | <td class="description">Public Preview</td> | ||
| 22 | <td> | ||
| 23 | <% if @node.draft.preview_token.present? %> | ||
| 24 | <%= link_to shared_preview_path(token: @node.draft.preview_token), shared_preview_url(token: @node.draft.preview_token), target: "_blank", rel: "noopener" %> | ||
| 25 | <%= button_to 'Revoke', revoke_shared_preview_node_path(@node), method: :put, form: { data: { confirm: "Revoke this preview link? Anyone currently using it will immediately lose access." } } %> | ||
| 26 | <% else %> | ||
| 27 | <%= button_to 'Create public preview link', generate_shared_preview_node_path(@node), method: :put %> | ||
| 28 | <% end %> | ||
| 29 | </td> | ||
| 30 | </tr> | ||
| 31 | <% end %> | ||
| 15 | <tr> | 32 | <tr> |
| 16 | <td class="description">Author</td> | 33 | <td class="description">Author</td> |
| 17 | <td><%= @page.user.try(:login) %></td> | 34 | <td><%= @page.user.try(:login) %></td> |
