aboutsummaryrefslogtreecommitdiff
path: root/views/default/object/plugin/elements
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-22 00:12:17 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-22 00:12:17 +0000
commit00ea6e1ddd446c61c6ccd956989b4b9a1cd60119 (patch)
tree4d3d546d88326fd976a8f75c0b4d4dac9b54ef1b /views/default/object/plugin/elements
parent8439fcf13d794780c89925896b8aaca521c14e30 (diff)
downloadelgg-00ea6e1ddd446c61c6ccd956989b4b9a1cd60119.tar.gz
elgg-00ea6e1ddd446c61c6ccd956989b4b9a1cd60119.tar.bz2
Refs #2950: Cleanup of plugin-related view structure
git-svn-id: http://code.elgg.org/elgg/trunk@8394 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/object/plugin/elements')
-rw-r--r--views/default/object/plugin/elements/dependencies.php49
1 files changed, 49 insertions, 0 deletions
diff --git a/views/default/object/plugin/elements/dependencies.php b/views/default/object/plugin/elements/dependencies.php
new file mode 100644
index 000000000..ea2b3a188
--- /dev/null
+++ b/views/default/object/plugin/elements/dependencies.php
@@ -0,0 +1,49 @@
+<?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_extract('plugin', $vars, false);
+$deps = $plugin->package->checkDependencies(true);
+
+$columns = array('type', 'name', 'expected_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 class=\"pas\">$column</th>";
+}
+
+echo '<tr/>';
+
+$row = 'odd';
+foreach ($deps as $dep) {
+ $fields = elgg_get_plugin_dependency_strings($dep);
+ $type = $dep['type'];
+
+ if ($dep['status']) {
+ $class = "elgg-state-success elgg-dependency-$type";
+ } else {
+ $class = "elgg-state-error elgg-dependency-$type";
+ }
+
+ echo "<tr class=\"$row\">";
+
+ foreach ($columns as $column) {
+ echo "<td class=\"pas $class\">{$fields[$column]}</td>";
+ }
+
+ echo '</tr>';
+
+ $row = ($row == 'odd') ? 'even' : 'odd';
+}
+
+echo '</table>'; \ No newline at end of file