1
0
mirror of https://github.com/danbee/danbarberphoto synced 2025-03-04 08:49:07 +00:00
danbarberphoto/app/views/admin/photos/_form.html.erb
Dan Barber 1f35c7210e Customise administrate
We've added some custom field types for dragonfly images,
text fields and markdown fields.
2015-10-26 14:26:32 +00:00

29 lines
772 B
Plaintext

<%= form_for([Administrate::NAMESPACE, @page.resource], class: "form") do |f| %>
<% if @page.resource.errors.any? %>
<div id="error_explanation">
<h2>
<%= pluralize(@page.resource.errors.count, "error") %>
prohibited this <%= @page.resource_name %> from being saved:
</h2>
<ul>
<% @page.resource.errors.full_messages.each do |message| %>
<li><%= message %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="form-inputs">
<% @page.attributes.each do |attribute| -%>
<div class="form-field form-field--<%= attribute.html_class %>">
<%= render_field attribute, f: f %>
</div>
<% end -%>
</div>
<div class="form-actions">
<%= f.submit %>
</div>
<% end %>