Sha256: 11e3a7902f0bd5fd2a06c9f507a750a50c0b0ed01a4ab3f3cd9b8cc0a079b49b

Contents?: true

Size: 929 Bytes

Versions: 21

Compression:

Stored size: 929 Bytes

Contents

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

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

- unless @file.new_record?

  = form.form_group bootstrap: {label: {text: t('.current_file')}}do
    - 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
  = submit_tag 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

21 entries across 21 versions & 7 rubygems

Version Path
comfortable_mexican_sofa-2.0.10 app/views/comfy/admin/cms/files/_form.html.haml