Sha256: 68b255040f199ec30b59d65ad96cf9631b4629f12c3fdefbb9f8145e3fe95be9

Contents?: true

Size: 1.41 KB

Versions: 1

Compression:

Stored size: 1.41 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 {%=locale.fileupload.error%}
      {%=locale.fileupload.errors[file.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'%}", :title => "{%=file.name%}"} {%=file.name%}
    %td.size
      %span {%=$('#fileupload').formatFileSize(file.size)%}
    %td{:colspan => "2"}
    {% } %}
    %td.delete
      %button.btn.btn-danger{"data-type" => "{%=file.delete_type%}", "data-url" => "{%=file.delete_url%}", "data-confirmation" => "Are you sure?"}
        %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.1.5 lib/generators/s3_cors_fileupload/install/templates/views/haml/_template_download.html.haml