Sha256: c61eaed7b961de9eb7da73b5d6876bde74e082824963257b4d01934142328b5c

Contents?: true

Size: 1.73 KB

Versions: 1

Compression:

Stored size: 1.73 KB

Contents

.import-page
  .import-page__header 
    h1.header-title #{@model.name} Import
    p.header-description To import #{@model.name.underscore} data using the form below.
  .import-page__body 
    h6.body-title Import data
    - if flash[:notice]
      .success-card
        h6.success-title
          i.fa-solid.fa-circle-check
          | SUCCESS
        p.success-msg Your file has been uploaded and it will be processed soon.
        / p.success-msg-info An email will be sent once the process is completed. If there are any problems with the import, we'll let you know through an email.
      .actions-wrapper
        a.btn-secondary href="#{cm_admin.send(:"#{@model.name.underscore}_import_path")}" Import new data
        / button.cta-btn.ml-2 Back to Page_Name
    - else
      = simple_form_for(FileImport.new, url: "/admin/#{@model.ar_model.table_name}/import", method: :post, html: { class: "csv-import-form" }) do |f|
        .form-card
          = f.input :associated_model_name, as: :hidden, placeholder: 'Enter product title', label: false, input_html: { value: @model.name }
          = f.input :import_file, as: :file, placeholder: 'Enter product title', label: false
          .note-card
            h6.note-title
              i.fa.fa-info-circle
              | Note
            .steps-wrapper 
              h6.steps-title Follow these steps to import your data
              ul.steps-list
                li
                  | Download this 
                  a href="#{@model.importer.sample_file_path}" template file
                li Add your data on the file without changing the format
                li Save the file as a csv
                li Upload the file in the field above
        = f.button :submit, class: "btn-cta", value: 'Import data'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cm-admin-1.1.9 app/views/cm_admin/main/import_form.html.slim