app/views/import/start.html.haml

Summary

Maintainability
Test Coverage
= javascript_include_tag "upload"

.app.view-import

  = render "application/header"

  .app-body

    .app-body-title
      .ui-body-title
        .ui-body-title-label
          %h1.title-xl
            %i.icon-upload
            = _("Import media")

    .app-body-ui-container
      .ui-container.bordered.bright.rounded-right.rounded-bottom

        = render :partial => "import/stepline", :locals => {:step => 1}

        .media-import.step1.pal.bordered-bottom.ui-container

          %h3.title-l.limited-width-m 
            = _("Make available images, video and audio files or documents:")

          .ui-container.clearfix.mvl.bordered.midtone.rounded.media-import-content

            #upload-ui-container
              #call2action
                = _("You have not selected any media yet.")
                %br
                %small
                  = _("(Drag & Drop)")
              #uploader

          .ui-actions
            = render :partial => "import/cancel"
            %a#import-start.primary-button.large{:href => permissions_import_path, :class => @media_entry_incompletes.count.zero? ? "disabled" : ""}
              = _("Continue...")

        .row.ui-container.midtone.pvm.phl.rounded-bottom
          .col1of2
            %h3.title-m.prm
              %strong
                = _("Note")
            %p.prm.ptx
              = _("Images (TIFF, JPEG, PNG) as well as audio and video files in popular formats are processed directly and can then be displayed.")
              = _("Bilder im CMYK-Farbraum werden nicht korrekt dargestellt. Wandeln Sie diese vor dem Import in RGB um.")
            %p.prm.pxt
              = _("Please import no more than 200 files at a time.")
          .col1of2
            %h3.title-m.plm
              %strong
                = _("Accepted file size")
            %p.plm.ptx
              = _("Files larger than 1.4 GB must be uploaded using an FTP dropbox.")
            %p.plm.ptx
              %strong
                %a.open_dropbox_dialog{:href => "javascript:void(0)", :style => "cursor:pointer"} 
                  = _("This is how you upload files using the FTP dropbox.")

  .app-footer-push
= render :partial => "application/footer", :locals => {:clipboard => false}

:coffeescript

  jQuery -> new App.ImportController.Upload
    dropboxData: 
      dropbox_exists: #{@user_dropbox_exists.to_json}
      dropbox_info: #{@dropbox_info.to_json}
    dropboxFiles: #{@dropbox_files.to_json}
    dropboxSyncIntervalTimer: 2000
    maxFileSize: "1400mb"
    mediaEntryIncompletes: #{ json_for(@media_entry_incompletes, {:filename => true, :size => true}) }
    multipartParams:
      '#{request_forgery_protection_token}': '#{form_authenticity_token}'
      '#{request.session_options[:key]}': '#{request.session_options[:id]}'
    nextStepUrl: "#{permissions_import_path}"