Sha256: 6442f433fbf11fe56732560aa5aa53c737182b20f5f344ba03df38271659b2f2
Contents?: true
Size: 1.63 KB
Versions: 5
Compression:
Stored size: 1.63 KB
Contents
<%= form_for([@object, @medium]) do |f| %> <div class="small-12 columns"> <%= f.submit('Save', class: 'success button') if can?(:update, Guts::Medium) || can?(:create, Guts::Medium) %> <% unless @medium.new_record? %> <%= link_to 'View', @medium.file.url(:original), class: 'warning hollow button', target: '_blank' %> <% end %> <%= link_to 'Back', polymorphic_url([@object, :media]), class: 'secondary hollow button' %> </div> <% if @medium.errors.any? %> <div class="small-12 columns"> <div class="callout warning"> <h5><%= pluralize(@medium.errors.count, 'error') %> prohibited this content from being saved:</h5> <ul> <% @medium.errors.full_messages.each do |message| %> <li><%= message %></li> <% end %> </ul> </div> </div> <% end %> <% if notice %> <div class="small-12 columns"> <div class="callout success notice"> <p><%= notice %></p> </div> </div> <% end %> <div class="small-12 columns"> <%= f.label :file %> <%= f.file_field :file, { class: 'hollow button' } %> </div> <div class="small-12 columns"> <%= f.label :title %> <%= f.text_field :title, required: true %> </div> <div class="small-12 columns"> <%= f.label :caption %> <%= f.text_field :caption %> </div> <div class="small-12 columns"> <%= f.label :tags %> <%= f.text_field :tags, { class: 'tags' } %> </div> <% if @object %> <%= f.hidden_field :filable_type, value: @object.class %> <%= f.hidden_field :filable_id, value: @object.id %> <% end %> <%= current_site_form_field f %> <% end %>
Version data entries
5 entries across 5 versions & 1 rubygems