<% content_for :subnavigation do %> <%= link_to 'Edit', edit_node_path(@node), :class => "unselected" %> <%= link_to 'Preview', preview_page_path(@page) %> <% end %>
People
Author <%= @page.user.try(:login) %>
Editor <%= @page.editor.try(:login) %>
<% if @node.locked? %>
Locked by <%= @node.lock_owner.login %> <%= unlock_link %>
<% end %>
Dates
Last updated <%= @page.updated_at %>
<% if @page.published_at.present? %>
<%= @page.public? ? 'Published at' : 'Will publish at' %> <%= @page.published_at %>
<% end %>
Links
Public <%= link_to @page.public_link, content_url(@node.unique_path) %>
<% if @node.draft %>
Admin Preview <%= link_to preview_page_path(@node.draft), preview_page_path(@node.draft) %>
Public Preview <% if @node.draft.preview_token.present? %> <%= link_to shared_preview_path(token: @node.draft.preview_token), shared_preview_url(token: @node.draft.preview_token), target: "_blank", rel: "noopener" %> <%= 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." } } %> <% else %> <%= button_to 'Create public preview link', generate_shared_preview_node_path(@node), method: :put %> <% end %>
<% end %>
Revisions
<%= pluralize(@node.pages.count, 'revision', 'revisions') %> · <%= link_to 'full history (diff / restore)', node_revisions_path(@node) %>
    <% @node.pages.order(:revision).each do |page| %>
  • <%= link_to "##{page.revision} — #{page.title} (#{page.user.try(:login)}, #{page.updated_at})", node_revision_path(@node, page) %>
  • <% end %>
Tags
<%= @page.tag_list %>
Events
    <% @node.events.order(:start_time).each do |event| %>
  • <%= event_schedule_text(event) %> [<%= link_to 'show', event_path(event, return_to: request.path) %> | <%= link_to 'edit', edit_event_path(event, return_to: request.path) %>]
  • <% end %>
<% mapping = default_event_tag_mapping(@page) %> <%= link_to 'add event', new_event_path(node_id: @node.id, tag_list: mapping&.last, auto_tag_source: mapping&.first, return_to: request.path) %>
<% if @node.children.any? %>
Children
<%= pluralize(@node.children.count, 'child', 'children') %>
    <% @node.children.order(:slug).each do |child| %>
  • <%= link_to (child.head&.title || child.draft&.title || child.slug), node_path(child) %>
  • <% end %>
<% end %>
Title
<%= sanitize(@page.title) %>
Abstract
<%= sanitize(@page.abstract) %>
Body
<%= sanitize(@page.body) %>
<%# Assets not yet addressed - no confirmed model/association seen for this page's attached assets %>