Sha256: 56af3304d8d99950ea8afdb575c228a29e266936d7c15d849447b9c2608c277d

Contents?: true

Size: 1.07 KB

Versions: 5

Compression:

Stored size: 1.07 KB

Contents

%div.container-fluid
  %h1 Images
  %div.row
    %div.col-md-6
      %h4 Upload Image
      = form_for @image, url: admin_images_path, method: :post, multipart: true do |f|
        = f.text_field :name, placeholder: 'give your image a title', class: 'form-control'
        = f.file_field :file, class: 'form-control'
        <br />
        = f.submit 'Upload', class: 'btn btn-primary'
    %div.col-md-6
      %h4 Image Url
      = form_for @image, url: admin_images_path, method: :post do |f|
        = f.hidden_field :is_url, value: true
        = f.text_field :name, placeholder: 'give your image a title', class: 'form-control'
        = f.text_field :file, placeholder: 'give me an image url', class: 'form-control'
        <br />
        = f.submit 'Insert', class: 'btn btn-primary'

  <hr>

  %div.row
    - @images.each do |image|
      %div.col-md-3.col-sm-4.col-xs-6
        .thumbnail
          = image_tag image.file
          %p
            = link_to image.name, image.file
          = link_to 'delete', admin_image_path(image), method: :delete, class: 'btn btn-xs btn-default'

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
pages_cms-1.2.3 app/views/pages_cms/admin/images/index.html.haml
pages_cms-1.2.2 app/views/pages_cms/admin/images/index.html.haml
pages_cms-1.2.1 app/views/pages_cms/admin/images/index.html.haml
pages_cms-1.2.0 app/views/pages_cms/admin/images/index.html.haml
pages_cms-1.1.0 app/views/pages_cms/admin/images/index.html.haml