Sha256: a2fd33cd68550ced03350748edf2878a0ddf9e1f52a8d8209c574fa0faa3281f

Contents?: true

Size: 1.87 KB

Versions: 5

Compression:

Stored size: 1.87 KB

Contents

<%# Never disable folders. Files are only disabled if their size exceeds the maximum %>
<% if file.container? || provider.config[:max_upload_file_size].blank?
   disabled = false
 else
   max_size = provider.config[:max_upload_file_size].to_i
   disabled = file.size > max_size
 end
%>
<tr role="row" tabindex="-1"
    data-ev-location="<%= file.location %>"
    data-tt-id="<%=path%>"
    data-tt-parent-id="<%=parent%>"
    data-tt-branch="<%=file.container? ? 'true' : 'false'%>">

  <td role="gridcell" title="<%= file.name %>" class="<%=file.container? ? 'ev-container' : 'ev-file'%> ev-file-name">
    <% if disabled %>
      <span title="<%= t('browse_everything.size_disabled', max_size: number_to_human_size(max_size)) %>"
            class="<%=file.container? ? 'folder' : 'file'%>" aria-hidden="true">
        <%= file.name %>
      </span>
      <span class="sr-only"><%= file.container? ? ', folder' : ', file' %> </span>
    <% else %>
      <%= link_to browse_everything_engine.contents_path(provider_name, file.id), class: 'ev-link' do %>
        <span class="<%=file.container? ? 'folder' : 'file'%>" aria-hidden="true"/>
        <%= file.name %>
        <span class="sr-only"><%= file.container? ? ', folder' : ', file' %> </span>
      <% end %>
    <% end %>
  </td>

  <% if file.container? %>
    <td role="gridcell" class="ev-directory-select">
      <%= check_box_tag(:select_all, "0", false, class: "ev-select-all") %>
    </td>
  <% else %>
    <td role="gridcell" class="ev-file-select">
      <%= check_box_tag(file.id.to_s.parameterize, "0", false, class: "ev-select-file") %>
    </td>
  <% end %>

  <td role="gridcell" class="ev-file-size">
    <%= number_to_human_size(file.size).sub(/Bytes/,'bytes') %>
  </td>

  <td role="gridcell" class="ev-file-kind">
    <%= file.type %>
  </td>

  <td role="gridcell" class="ev-file-date">
    <%= file.mtime.strftime('%F %R') %>
  </td>
</tr>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
browse-everything-0.15.1 app/views/browse_everything/_file.html.erb
browse-everything-0.15.0 app/views/browse_everything/_file.html.erb
browse-everything-0.14.2 app/views/browse_everything/_file.html.erb
browse-everything-0.14.1 app/views/browse_everything/_file.html.erb
browse-everything-0.14.0 app/views/browse_everything/_file.html.erb