Sha256: 7abaf7ded130035d6008244d284c471646a33918e061eb5863b0cb39a54c3153

Contents?: true

Size: 1002 Bytes

Versions: 2

Compression:

Stored size: 1002 Bytes

Contents

<h2>Pages: &ldquo;<%= @page.title %>&rdquo;</h2>

<h3>Content Blocks</h3>

<% if @page.content_blocks.count > 0 %>
  <table>
    <thead>
      <th>Title</th>
      <th>Created</th>
      <th>Updated</th>
    </thead>

    <tbody>
      <% @page.content_blocks.each do |c| %>
        <%= content_tag_for(:tr, c) do %>
          <td><%= link_to c.title, edit_manifest_content_block_path(c) %></td>
          <td><%= c.created_at.to_s(:short) %></td>
          <td><%= c.updated_at.to_s(:short) %></td>
        <% end %>
      <% end %>
    </tbody>
  </table>
<% else %>
  <p>This page has no content blocks of its own. <%= link_to('Add one!', new_manifest_content_block_path(content_block: { page_id: @page.id })) if current_editor.admin? %></p>
<% end %>

<% if current_editor.admin? %>
  <%= link_to 'Edit Page', edit_manifest_page_path(@page) %>
  <%= link_to 'Delete Page', manifest_page_path(@page), method: :delete, confirm: "Are you sure you want to delete page \"#{@page.title}\"?" %>
<% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
manifest-rails-0.2.1 app/views/manifest/pages/show.html.erb
manifest-rails-0.2.0 app/views/manifest/pages/show.html.erb