= form.text_field :label
= form.file_field :file, :multiple => @file.new_record?

- unless @file.new_record?
  = form.element t('.current_file'), nil do
    = link_to @file.file.url, @file.file.url, :target => '_blank'

= form.text_area :description

= render :partial => 'cms_admin/categories/form', :object => form

.form-actions
  = form.submit t(@file.new_record?? '.create' : '.update'), :class => 'btn btn-primary'

= form.text_field :label
= form.file_field :file, :multiple => @file.new_record?

- unless @file.new_record?
  = form.element t('.current_file'), nil do
    = link_to @file.file.url, @file.file.url, :target => '_blank'
    = image_tag @file.file.url if @file.is_image?

= form.text_area :description

= render :partial => 'cms_admin/categories/form', :object => form

.form-actions
  = form.submit t(@file.new_record?? '.create' : '.update'), :class => 'btn btn-primary'

Add preview of file if image
Add preview of file if image
