diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-01-05 04:36:07 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-01-05 04:36:07 +0000 |
commit | f2123cdc42c8da21a297158fbb655f72bc92edce (patch) | |
tree | 6eb8c0a4492e5dddd29a87ad68a4ecadc7f01230 /views/default/admin/components/plugin_dependencies.php | |
parent | 252c054437ac1d3ad43aca1e71ebb936b55d60d2 (diff) | |
download | elgg-f2123cdc42c8da21a297158fbb655f72bc92edce.tar.gz elgg-f2123cdc42c8da21a297158fbb655f72bc92edce.tar.bz2 |
Fixes #2760. Refs #2759. Updated plugin admin actions to use the new system. Added plugin dependency views in admin. ElggPluginPackage->checkDependencies() now returns the detected value.
git-svn-id: http://code.elgg.org/elgg/trunk@7838 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/admin/components/plugin_dependencies.php')
-rw-r--r-- | views/default/admin/components/plugin_dependencies.php | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/views/default/admin/components/plugin_dependencies.php b/views/default/admin/components/plugin_dependencies.php new file mode 100644 index 000000000..9e0e284f1 --- /dev/null +++ b/views/default/admin/components/plugin_dependencies.php @@ -0,0 +1,45 @@ +<?php +/** + * Shows a table of plugin dependecies for ElggPlugin in $vars['plugin']. + * + * This uses a table because it's a table of data. + * + * @package Elgg.Core + * @subpackage Admin.Plugins + */ + +$plugin = elgg_get_array_value('plugin', $vars, false); +$deps = $plugin->package->checkDependencies(true); + +$columns = array('type', 'name', 'value', 'local_value', 'comment'); + +echo '<table class="elgg-plugins-dependencies styled"> + <tr> +'; + +foreach ($columns as $column) { + $column = elgg_echo("admin:plugins:dependencies:$column"); + echo "<th>$column</th>"; +} + +echo '<tr/>'; + +foreach ($deps as $dep) { + $fields = elgg_get_plugin_dependency_strings($dep); + + if ($dep['status']) { + $class = 'elgg-satisfied-dependency'; + } else { + $class = 'elgg-unsatisfied-dependency'; + } + + echo "<tr class=\"$class\">"; + + foreach ($columns as $column) { + echo "<td class=\"pam \">{$fields[$column]}</td>"; + } + + echo '</tr>'; +} + +echo '</table>';
\ No newline at end of file |