<%= link_to data_vault_path, class: 'grey-text tooltipped', style: 'position: relative; top: 4px;', data: {
position: 'bottom',
enterDelay: '500',
tooltip: "Back to your Data Vault"
} do %>
arrow_back
<% end %>
Your notebook's image uploads
used
<%= Filesize.from("#{current_user.image_uploads.sum(:src_file_size) / 1000}KB").pretty %>
remaining
<%= (current_user.upload_bandwidth_kb) > 0 ? Filesize.from("#{current_user.upload_bandwidth_kb}KB").pretty : '-' + Filesize.from("#{current_user.upload_bandwidth_kb.abs}KB").pretty %>
<% if current_user.image_uploads.empty? %>
Whenever you upload any images to your notebook pages, you'll be able to view them all
in a single place from here.
<% end %>
<% current_user.image_uploads.includes(:content).each do |upload| %>
<%= image_tag upload.src(:medium), class: 'hoverable materialboxed' %>
- Uploaded to <%= link_to upload.content.name, upload.content %>
-
Uploaded <%= time_ago_in_words upload.created_at %> ago
(<%= upload.created_at.strftime("%m/%d/%Y")%>)
-
Using
<%= Filesize.from("#{upload.src_file_size / 1000}KB").pretty %>
-
Image type: <%= upload.src_content_type %>
-
<%= link_to 'View full size', upload.src(:original), class: 'small btn', target: '_new' %>
<%= link_to 'Delete this image', image_deletion_path(upload.id), class: 'small btn', method: 'delete', data: { confirm: "Are you sure you want to delete this image? This cannot be undone." } %>
<% end %>