aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--languages/en.php6
-rw-r--r--views/default/tidypics/forms/upload.php19
2 files changed, 20 insertions, 5 deletions
diff --git a/languages/en.php b/languages/en.php
index 9d39c64c6..e0201dc46 100644
--- a/languages/en.php
+++ b/languages/en.php
@@ -80,8 +80,7 @@
'album:desc' => "Description",
'album:tags' => "Tags",
'album:cover' => "Make image album cover?",
- 'album:cover:yes' => "Yes",
- 'image:access:note' => "(view access is inherited from the album)",
+ 'tidypics:quota' => "Quota usage:",
//views
@@ -144,10 +143,9 @@
'images:edited' => "Your images were successfully updated.",
'album:edited' => "Your album was successfully updated.",
'album:saved' => "Your album was successfully saved.",
- 'album:deleted' => "Your album was successfully deleted.",
+ 'album:deleted' => "Your album was successfully deleted.",
'album:delete:confirm' => "Are you sure you want to delete this album?",
'album:created' => "Your new album has been created.",
- 'tidypics:status:processing' => "Please wait while we process your picture....",
'tidypics:settings:save:ok' => 'Successfully saved the Tidypics plugin settings',
//Error messages
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>