From 2c91425f408cceec2f3e36ffc9f7038efe1a7096 Mon Sep 17 00:00:00 2001 From: ewinslow Date: Thu, 10 Feb 2011 23:19:14 +0000 Subject: Moved the simple plugins admin form to the forms/ dir git-svn-id: http://code.elgg.org/elgg/trunk@8097 36083f99-b078-4883-b0ff-0f9b5a30f544 --- .../forms/admin/plugins/simple_update_states.php | 102 +++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 views/default/forms/admin/plugins/simple_update_states.php (limited to 'views/default/forms') diff --git a/views/default/forms/admin/plugins/simple_update_states.php b/views/default/forms/admin/plugins/simple_update_states.php new file mode 100644 index 000000000..ac8a103fd --- /dev/null +++ b/views/default/forms/admin/plugins/simple_update_states.php @@ -0,0 +1,102 @@ +isValid()) { + continue; + } + $interface = $plugin->manifest->getAdminInterface(); + if ($interface == 'simple') { + $plugin_list[$plugin->manifest->getName()] = $plugin; + } +} + +ksort($plugin_list); + +echo <<<___END + +___END; + +$actions_base = '/action/admin/plugins/'; +$ts = time(); +$token = generate_action_token($ts); + +foreach ($plugin_list as $name => $plugin) { + $plugin_guid = $plugin->guid; + $plugin_id = $plugin->getID(); + $active = $plugin->isActive(); + $can_activate = $plugin->canActivate(); + $author = $plugin->manifest->getAuthor(); + $version = $plugin->manifest->getVersion(); + $website = $plugin->manifest->getWebsite(); + $description = $plugin->manifest->getDescription(); + + if ($active) { + $active_class = 'active'; + $checked = 'checked="checked"'; + } else { + $active_class = 'not_active'; + $checked = ''; + } + + if ($can_activate) { + $disabled = ''; + } else { + $disabled = 'disabled="disabled"'; + $description .= '

' . elgg_echo('admin:plugins:simple:cannot_activate') . '

'; + } + + $description = elgg_view('output/longtext', array('value' => $description)); + + $author_html = $link_html = $version_html = $settings_html = ''; + + if ($author) { + $author_html = elgg_echo('admin:plugins:author', array($author)); + } + + if ($version) { + $version_html = ' | ' . elgg_echo('admin:plugins:version', array($version)); + } + + if ($website) { + $link_html = " | " . elgg_echo('admin:plugins:plugin_website') . ''; + } + + if (elgg_view_exists("settings/$plugin_id/edit")) { + $settings_href = elgg_get_site_url() . "pg/admin/plugin_settings/$plugin_id"; + $settings_html = " | " . elgg_echo('settings') . ""; + } + + echo <<<___END + + + + +___END; +} + +echo '
+ + + + $description + +
'; +echo elgg_view('input/submit', array('value' => elgg_echo('save'))); +echo elgg_view('input/reset', array('value' => elgg_echo('reset'))); -- cgit v1.2.3