<% if @content_block.errors.any? %>

Whoops!

Please correct the following errors:

<% end %> <%= form_for [:manifest, @content_block], builder: Manifest::LabelledFormBuilder do |f| %> <% if current_editor.admin? %> <%= f.text_field :title %> <% else %>

Title: <%= @content_block.title %>

<% end %> <% if current_editor.admin? %> <%= f.collection_select :page_id, Page.all, :id, :title %> <% else %>

Page: <%= @content_block.page ? @content_block.page.title : 'No page' %>

<% end %> <% if current_editor.admin? %> <%= f.check_box :allow_html %> <% end %> <% if @content_block.allow_html? %> <%= f.text_area :content, class: 'tinymce' %> <% else %> <%= f.text_area :content %> <% end %> <%= f.submit %> <% end %>