diff options
Diffstat (limited to 'views/default/admin')
-rw-r--r-- | views/default/admin/administer_utilities/tidypics_tools.php (renamed from views/default/admin/administer_utilities/tidypics_server_info.php) | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/views/default/admin/administer_utilities/tidypics_server_info.php b/views/default/admin/administer_utilities/tidypics_tools.php index 6a034a561..1df664be8 100644 --- a/views/default/admin/administer_utilities/tidypics_server_info.php +++ b/views/default/admin/administer_utilities/tidypics_tools.php @@ -3,8 +3,9 @@ * Tidypics server analysis */ -$title = elgg_echo('admin:administer_utilities:tidypics_server_info'); +$title = elgg_echo('admin:administer_utilities:tidypics_tools'); +// server info function tp_readable_size($bytes) { if (strpos($bytes, 'M')) { return $bytes . 'B'; @@ -127,4 +128,39 @@ ob_start(); $content = ob_get_clean(); -echo elgg_view_module('inline', elgg_echo('admin:administer_utilities:tidypics_server_info'), $content); +echo elgg_view_module('inline', elgg_echo('tidypics:server_info'), $content); + +// image library tools +$content = '<p>' . elgg_echo('tidypics:lib_tools:overview') . '</p>'; +$content .= '<p>' . elgg_echo('tidypics:lib_tools:testing') . '</p>'; +$content .= '<p><label>' . elgg_echo('tidypics:settings:im_path'); +$content .= elgg_view('input/text', array( + 'name' => 'im_location' +)); +$content .= elgg_view('input/submit', array( + 'value' => elgg_echo('submit'), + 'id' => 'tidypics-im-test' +)); +$content .= '</p>'; +$content .= '<p id="tidypics-im-results"></p>'; + +echo elgg_view_module('inline', elgg_echo('tidypics:lib_tools'), $content); + +?> +<script type="text/javascript"> + $(function() { + $('#tidypics-im-test').click(function() { + var loc = $('input[name=im_location]').val(); + $("#tidypics-im-results").html(""); + $.ajax({ + type: "GET", + url: elgg.normalize_url('mod/tidypics/actions/admin/imtest.php'), + data: {location: loc}, + cache: false, + success: function(html){ + $("#tidypics-im-results").html(html); + } + }); + }); + }); +</script> |