Sha256: e50fdb36119f794563b82c0b8b97f80ca7cce1922d1a0caba76165f426a81e87

Contents?: true

Size: 1.04 KB

Versions: 5

Compression:

Stored size: 1.04 KB

Contents

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

<h3>Content Blocks</h3>

<% if @page.content_blocks.count > 0 %>
  <table id='table:content_blocks' class='resource_table'>
    <thead>
      <th>Title</th>
      <th class='minor'>Created</th>
      <th class='minor'>Updated</th>
    </thead>

    <tbody>
      <% @page.content_blocks.each do |c| %>
        <%= content_tag_for(:tr, c) do %>
          <td><%= c.title %></td>
          <td class='minor'><%= c.created_at.to_s(:short) %></td>
          <td class='minor'><%= 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

5 entries across 5 versions & 1 rubygems

Version Path
manifest-rails-0.2.8 app/views/manifest/pages/show.html.erb
manifest-rails-0.2.7 app/views/manifest/pages/show.html.erb
manifest-rails-0.2.6 app/views/manifest/pages/show.html.erb
manifest-rails-0.2.5 app/views/manifest/pages/show.html.erb
manifest-rails-0.2.4 app/views/manifest/pages/show.html.erb