From 85d80a7839fd89ffa6f4bd4d0f1cce3ec7c59513 Mon Sep 17 00:00:00 2001 From: Kyle Drake Date: Mon, 3 Jun 2013 17:59:38 -0700 Subject: [PATCH] show percentage --- views/dashboard.slim | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/views/dashboard.slim b/views/dashboard.slim index 4698f4af..270df029 100644 --- a/views/dashboard.slim +++ b/views/dashboard.slim @@ -10,7 +10,7 @@ javascript: } .row - .span8.offset4 + .span5.offset1 h1 Your home page @@ -40,6 +40,12 @@ javascript: a href="#" onclick="confirmFileDelete('#{file.filename}')" Delete Upload New File + .span5 + + .progress.progress-info.progress-striped + .bar style="width: #{(current_site.total_space / Site::MAX_SPACE) * 100}%" + + h4 You are currently using #{((current_site.total_space.to_f / Site::MAX_SPACE) * 100).round(1)}% (#{(current_site.total_space.to_f / 2**20).round(2)}MB) of your total #{(Site::MAX_SPACE.to_f / 2**20).to_i}MB of total space. form method="POST" action="/site_files/delete" id="deleteFilenameForm" input type="hidden" id="deleteFilenameInput" name="filename"