Sha256: 3ce71ec9a054057f60a4f76a353df7dc117c3ed162a5e4134e15af1017cf2d98
Contents?: true
Size: 1.24 KB
Versions: 5
Compression:
Stored size: 1.24 KB
Contents
<h3>Project Images</h3> <table class="table"> <thead> <tr> <th>Image</th> <th>Default</th> <th colspan="2"></th> </tr> </thead> <tbody> <% @item.site_item_images.each do |image| %> <tr> <td><%= image_tag image.image.url(:thumb) %></td> <td><%= image.default ? 'Yes' : 'No' %></td> <td><%= link_to 'Set Default', [:set_default, :admin, @site, @item, image], method: :put unless image.default %></td> <td><%= link_to 'Destroy', [:admin, @site, @item, image], method: :delete, data: {confirm: 'Are you sure?'} %></td> </tr> <% end %> </tbody> </table> <%= form_for [:admin, @site, @item, @image] do |f| %> <%= render 'portfolio/shared/form_errors', record: @image %> <div class="row"> <div class="col-xs-6"> <div class="form-group"> <%= f.label :image %><br> <%= f.file_field :image, class: 'form-control' %> </div> </div> <div class="col-xs-6"> <div class="checkbox"> <label> <br> <%= f.check_box :default %> Default </label> </div> </div> </div> <div class="actions"> <%= f.hidden_field :site_item_id %> <%= f.submit class: 'btn btn-primary' %> </div> <% end %>
Version data entries
5 entries across 5 versions & 1 rubygems