2013-12-25 10:39:05 +00:00
|
|
|
<%= form_for(@template, :html => {:multipart => true}) do |f| %>
|
|
|
|
<% if @template.errors.any? %>
|
|
|
|
<div id="error_explanation">
|
|
|
|
<h2><%= pluralize(@template.errors.count, "error") %> prohibited this template from being saved:</h2>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<% @template.errors.full_messages.each do |msg| %>
|
|
|
|
<li><%= msg %></li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<div class="field">
|
|
|
|
<%= f.label :title %><br>
|
|
|
|
<%= f.text_field :title %>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<%= f.label :author %><br>
|
|
|
|
<%= f.text_field :author %>
|
|
|
|
</div>
|
|
|
|
<p>
|
|
|
|
<label>Preview</label>
|
|
|
|
<%= f.file_field :preview %>
|
|
|
|
<%= f.hidden_field :preview_cache %>
|
|
|
|
</p>
|
2013-12-26 09:49:49 +00:00
|
|
|
|
2013-12-25 10:39:05 +00:00
|
|
|
<p>
|
2013-12-26 09:49:49 +00:00
|
|
|
<label>Template</label>
|
2013-12-25 10:39:05 +00:00
|
|
|
<%= f.file_field :template %>
|
|
|
|
<%= f.hidden_field :template_cache %>
|
|
|
|
</p>
|
2013-12-26 09:49:49 +00:00
|
|
|
|
2013-12-25 10:39:05 +00:00
|
|
|
<div class="actions">
|
|
|
|
<%= f.submit %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|