diff options
author | Cash Costello <cash.costello@gmail.com> | 2009-06-21 13:26:48 +0000 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2009-06-21 13:26:48 +0000 |
commit | fef76848f2e6f52d5f4941b9b519aadf996070cf (patch) | |
tree | c44300e4677be33fbf990e5388751cb99659d29f /views/default/tidypics/forms | |
parent | bda141ad119b7d382a8689182edd80aa603c2442 (diff) | |
download | elgg-fef76848f2e6f52d5f4941b9b519aadf996070cf.tar.gz elgg-fef76848f2e6f52d5f4941b9b519aadf996070cf.tar.bz2 |
added quota message
Diffstat (limited to 'views/default/tidypics/forms')
-rw-r--r-- | views/default/tidypics/forms/upload.php | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/views/default/tidypics/forms/upload.php b/views/default/tidypics/forms/upload.php index a8f3c8386..c4313bf40 100644 --- a/views/default/tidypics/forms/upload.php +++ b/views/default/tidypics/forms/upload.php @@ -4,11 +4,21 @@ //this is for image uploads only. Image edits are handled by edit.php form $container_guid = get_input('container_guid'); - $access_id = get_entity($vars['album'])->access_id; + $album = get_entity($vars['album']); + $access_id = $album->access_id; $maxfilesize = (int) get_plugin_setting('maxfilesize','tidypics'); if (!$maxfilesize) $maxfilesize = 5; + + $quota = get_plugin_setting('quota','tidypics'); + if ($quota) { + $image_repo_size_md = get_metadata_byname($album->container_guid, "image_repo_size"); + $image_repo_size = (int)$image_repo_size_md->value; + $image_repo_size = round($image_repo_size / 1024 / 1024); + if ($image_repo_size > $quota) + $image_repo_size = $quota; + } ?> <div id="tidypics_ref"></div> @@ -19,6 +29,13 @@ <p style="line-height:1.6em;"> <label><?php echo elgg_echo("images:upload"); ?></label><br /> <i><?php echo elgg_echo("tidypics:settings:maxfilesize") . ' ' . $maxfilesize; ?></i><br /> +<?php + if ($quota) { +?> + <i><?php echo elgg_echo("tidypics:quota") . ' ' . $image_repo_size . '/' . $quota . ' MB'; ?></i><br /> +<?php + } +?> <div class="tidypics_popup"> Uploading images<br /> <div style="margin:20px 0px 20px 80px;"><img alt="..." border="0" src="<?php echo $vars['url'].'mod/tidypics/graphics/loader.gif' ?>" /></div> |