Sha256: 6c4ef502229da92ca17740d616112c30097e5dd12b6c6b1ba446032182a50439

Contents?: true

Size: 1.69 KB

Versions: 1

Compression:

Stored size: 1.69 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
    %td
      %span.preview
        {% if (file.thumbnailUrl) { %}
        %a{:download => "{%=file.name%}", :href => "{%=file.url%}", :title => "{%=file.name%}", :"data-gallery" => ''}
          %img{:src => "{%=file.thumbnailUrl%}"}
        {% } %}
    %td
      %p.name
        {% if (file.url) { %}
        %a{:href => "{%=file.url%}", :title => "{%=file.name%}", :download => "{%=file.name%}", :"data-gallery" => !"{%= file.thumbnailUrl ? ' ' : '' %}".html_safe.empty? && ''} {%=file.name%}
        {% } else { %}
        %span {%=file.name%}
        {% } %}
      {% if (file.error) { %}
      %div
        %span.label.label-danger Error
        {%=file.error%}
      {% } %}
    %td
      %span.size {%=o.formatFileSize(file.size)%}
    %td
      {% if (file.deleteUrl) { %}
      %button.btn.btn-danger.delete{"data-type" => "{%=file.deleteType%}", "data-url" => "{%=file.deleteUrl%}", "data-confirmation" => "Are you sure?", "data-xhr-fields" => !"{% if (file.delete_with_credentials) { %} {'withCredentials': true} {% } %}".blank? && "{% if (file.delete_with_credentials) { %} {'withCredentials': true} {% } %}"}
        %i.glyphicon.glyphicon-trash
        %span Delete
      %input.toggle{:name => "delete", :type => "checkbox", :value => "1"}
      {% } else { %}
      %button.btn.btn-warning.cancel
        %i.glyphicon.glyphicon-ban-circle
        %span Cancel
      {% } %}
  {% } %}

Version data entries

1 entries across 1 versions & 1 rubygems

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