Sha256: 4f32228ccc0e1632d4e8c0f574bb1dc48bb4cfd2958031406e14bf5197a2acf4

Contents?: true

Size: 1.04 KB

Versions: 10

Compression:

Stored size: 1.04 KB

Contents

= comfy_admin_partial "comfy/admin/cms/partials/file_form_before", form: form

= form.text_field :label
= form.file_field :file

// TODO replace with form_group when it's fixed: https://github.com/bootstrap-ruby/rails-bootstrap-forms/issues/353
- unless @file.new_record?
  .form-group.row
    .col-sm-2.text-lg-right
      = t('.current_file')
    .col-sm-10
      - if @file.attachment.image?
        .file-image
          = image_tag @file.attachment
      = link_to @file.attachment.filename, @file.attachment, target: '_blank'

= form.text_area :description

= render 'comfy/admin/cms/categories/form', form: form

= comfy_admin_partial 'comfy/admin/cms/partials/file_form_after', form: form

= form.form_actions do
  = form.submit t(@file.new_record?? '.create' : '.update'), class: 'btn btn-primary'
  - unless @file.new_record?
    = link_to t('.delete'), comfy_admin_cms_site_file_path(@site, @file), method: :delete, data: {confirm: t('.are_you_sure')}, class: 'btn btn-danger'
  = link_to t('.cancel'), comfy_admin_cms_site_files_path, class: 'btn btn-link'

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
comfortable_mexican_sofa-2.0.9 app/views/comfy/admin/cms/files/_form.html.haml
comfortable_mexican_sofa-2.0.8 app/views/comfy/admin/cms/files/_form.html.haml
comfortable_mexican_sofa-2.0.7 app/views/comfy/admin/cms/files/_form.html.haml
comfortable_mexican_sofa-2.0.6 app/views/comfy/admin/cms/files/_form.html.haml
comfortable_mexican_sofa-2.0.5 app/views/comfy/admin/cms/files/_form.html.haml
comfortable_mexican_sofa-2.0.4 app/views/comfy/admin/cms/files/_form.html.haml
comfortable_mexican_sofa-2.0.3 app/views/comfy/admin/cms/files/_form.html.haml
comfortable_mexican_sofa-2.0.2 app/views/comfy/admin/cms/files/_form.html.haml
comfortable_mexican_sofa-2.0.1 app/views/comfy/admin/cms/files/_form.html.haml
comfortable_mexican_sofa-2.0.0 app/views/comfy/admin/cms/files/_form.html.haml