Sha256: ad0f8ee73997c7f380f0fcbe46dabf3880955e9244a73e5da96d436f6df79ac9

Contents?: true

Size: 1.24 KB

Versions: 8

Compression:

Stored size: 1.24 KB

Contents

<%= form_for(@type) do |f| %>
  <div class="small-12 columns">
    <%= f.submit "Save", class: "success button" %>
    <%= link_to "Back", types_path, class: "secondary hollow button" %>
    <% unless @type.new_record? %>
      <%= link_to "Records (#{@type.contents.size})", contents_path(type: @type.slug), class: 'hollow button warning' %>
      <%= link_to "Metafields (#{@type.metafields.size})", type_metafields_path(@type), class: 'hollow button' %>
      <%= link_to "Media (#{@type.media.size})", type_media_path(@type), class: 'hollow button alert' %>
    <% end %>
  </div>

  <% if @type.errors.any? %>
    <div class="small-12 columns">
      <div class="callout warning">
        <h5><%= pluralize(@type.errors.count, 'error') %> prohibited this content from being saved:</h5>

        <ul>
          <% @type.errors.full_messages.each do |message| %>
            <li><%= message %></li>
          <% end %>
        </ul>
      </div>
    </div>
  <% end %>

  <div class="small-12 columns">
    <%= f.label :title %>
    <%= f.text_field :title %>
  </div>

  <% unless @type.new_record? %>
    <div class="small-12 columns">
      <%= f.label :slug %>
      <%= f.text_field :slug %>
    </div>
  <% end %>

  <%= current_site_form_field f %>
<% end %>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
guts-1.3.2 app/views/guts/types/_form.html.erb
guts-1.3.1 app/views/guts/types/_form.html.erb
guts-1.3.0 app/views/guts/types/_form.html.erb
guts-1.2.2 app/views/guts/types/_form.html.erb
guts-1.2.1 app/views/guts/types/_form.html.erb
guts-1.2.0 app/views/guts/types/_form.html.erb
guts-1.1.1 app/views/guts/types/_form.html.erb
guts-1.1.0 app/views/guts/types/_form.html.erb