Sha256: 2795837e9757047d5a2bd1bbe34b97c5fd40a47ee85e3702194bd5efdf138969

Contents?: true

Size: 1.54 KB

Versions: 1

Compression:

Stored size: 1.54 KB

Contents

/ To be used with Javascript-Templates (see: https://github.com/blueimp/JavaScript-Templates)
/ The template to display files available for download (the stock one from the jquery-fileupload script)
%script#template-download{:type => "text/x-tmpl"}
  {% for (var i=0, file; file=o.files[i]; i++) { %}
  %tr.template-download.fade
    {% if (file.error) { %}
    %td
    %td.name
      %span {%=file.name%}
    %td.size
      %span {%=o.formatFileSize(file.size)%}
    %td.error{:colspan => "2"}
      %span.label.label-important Error
      {%=file.error%}
    {% } else { %}
    %td.preview
      {% if (file.thumbnail_url) { %}
      %a{:download => "{%=file.name%}", :href => "{%=file.url%}", :rel => "gallery", :title => "{%=file.name%}"}
        %img{:src => "{%=file.thumbnail_url%}"}/
      {% } %}
    %td.name
      %a{:download => "{%=file.name%}", :href => "{%=file.url%}", :rel => "{%=file.thumbnail_url&&'gallery'%}".html_safe, :title => "{%=file.name%}"} {%=file.name%}
    %td.size
      %span {%=$('#fileupload').formatFileSize(file.size)%}
    %td{:colspan => "2"}
    {% } %}
    %td
      %button.btn.btn-danger.delete{"data-type" => "{%=file.delete_type%}", "data-url" => "{%=file.delete_url%}", "data-confirmation" => "Are you sure?", "data-xhr-fields" => !"{% if (file.delete_with_credentials) { %} {'withCredentials': true} {% } %}".blank? && "{% if (file.delete_with_credentials) { %} {'withCredentials': true} {% } %}"}
        %i.icon-trash.icon-white
        %span Delete
      %input{:name => "delete", :type => "checkbox", :value => "1"}
  {% } %}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
s3_cors_fileupload-0.2.0 lib/generators/s3_cors_fileupload/install/templates/views/haml/_template_download.html.haml