Sha256: a2660749e746a63a6d190e05ef31c3a7950e0eddca603379ed8561cf3c321a1c

Contents?: true

Size: 1021 Bytes

Versions: 6

Compression:

Stored size: 1021 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, :confirm => "Are you sure you want to delete this Content Block?", :class => 'btn btn-danger' %></p>
<% end %>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
smithycms-0.4.2 app/views/smithy/content_blocks/edit.html.erb
smithycms-0.4.1 app/views/smithy/content_blocks/edit.html.erb
smithycms-0.4.0 app/views/smithy/content_blocks/edit.html.erb
smithycms-0.0.3 app/views/smithy/content_blocks/edit.html.erb
smithycms-0.0.2 app/views/smithy/content_blocks/edit.html.erb
smithycms-0.0.1 app/views/smithy/content_blocks/edit.html.erb