Sha256: 591a98eda2d9b626fb7161714c3fe3843a0e0b5f07af3b13b6a683a733f37957

Contents?: true

Size: 1007 Bytes

Versions: 5

Compression:

Stored size: 1007 Bytes

Contents

<% content_for :title, "Content Blocks" %>

<%= render partial: "secondary_nav" %>

<%= semantic_form_for @content_block do |f| %>
  <%= f.inputs do %>
    <dl>
      <dt>Name</dt>
      <dd><%= @content_block.name %></dd>
      <dt>Description</dt>
      <dd><%= @content_block.description %></dd>
      <dt>Variables Available</dt>
      <% @content_block.content_field_names.each do |field| %>
        <dd>{{ <%= field %> }}</dd>
      <% end %>
    </dl>
  <% end %>

  <div><%= link_to_add_fields "Add a Template", :templates, f %></div>
  <%= f.semantic_fields_for(:templates) do |builder| %>
    <%= render partial: "template_fields", locals: { f: builder } %>
  <% end %>

  <%= f.actions do %>
    <%= f.action :submit, label: "Save this Content Block" %>
  <% end %>
<% end %>

<% content_for :related do %>
  <p><%= link_to "Delete Content Block", @content_block, method: :delete, data: { confirm: "Are you sure you want to delete this Content Block?" }, class: 'btn btn-danger' %></p>
<% end %>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
smithycms-0.5.1 app/views/smithy/content_blocks/edit.html.erb
smithycms-0.5.0 app/views/smithy/content_blocks/edit.html.erb
smithycms-0.4.5 app/views/smithy/content_blocks/edit.html.erb
smithycms-0.4.4 app/views/smithy/content_blocks/edit.html.erb
smithycms-0.4.3 app/views/smithy/content_blocks/edit.html.erb