diff options
Diffstat (limited to 'views/default/admin/plugins')
| -rw-r--r-- | views/default/admin/plugins/advanced.php | 104 | ||||
| -rw-r--r-- | views/default/admin/plugins/simple.php | 94 |
2 files changed, 0 insertions, 198 deletions
diff --git a/views/default/admin/plugins/advanced.php b/views/default/admin/plugins/advanced.php deleted file mode 100644 index 195df5169..000000000 --- a/views/default/admin/plugins/advanced.php +++ /dev/null @@ -1,104 +0,0 @@ -<?php -/** - * Elgg administration advanced plugin screen - * - * Shows a list of all plugins sorted by load order. - * - * @package Elgg - * @subpackage Core - */ - -regenerate_plugin_list(); -$installed_plugins = get_installed_plugins(); -$plugin_list = array(); -$show_category = get_input('category', NULL); - -// Get a list of the all categories -// and trim down the plugin list if we're not viewing all categories. -// @todo this could be cached somewhere after have the manifest loaded -$categories = array(); - -foreach ($installed_plugins as $id => $plugin) { - $plugin_categories = $plugin['manifest']['category']; - - // handle plugins that don't declare categories - if ((!$plugin_categories && $show_category) || ($show_category && !in_array($show_category, $plugin_categories))) { - unset($installed_plugins[$id]); - } - - foreach ($plugin_categories as $category) { - if (!array_key_exists($category, $categories)) { - $categories[$category] = elgg_echo("admin:plugins:label:moreinfo:categories:$category"); - } - } -} - -$ts = time(); -$token = generate_action_token($ts); -$categories = array_merge(array('' => elgg_echo('admin:plugins:categories:all')), $categories); - -$category_pulldown = elgg_view('input/pulldown', array( - 'internalname' => 'category', - 'options_values' => $categories, - 'value' => $show_category -)); - -$category_button = elgg_view('input/submit', array( - 'value' => elgg_echo('filter'), - 'class' => 'action-button' -)); - -$category_form = elgg_view('input/form', array( - 'body' => $category_pulldown . $category_button -)); - -// Page Header elements -$title = elgg_view_title(elgg_echo('admin:plugins')); - -// @todo Until "en/disable all" means "All plugins on this page" hide when not looking at all. -if (!isset($show_category) || empty($show_category)) { - $buttons = "<a class='action-button' href=\"{$CONFIG->url}action/admin/plugins/enableall?__elgg_token=$token&__elgg_ts=$ts\">".elgg_echo('enableall')."</a> <a class='action-button disabled' href=\"{$CONFIG->url}action/admin/plugins/disableall?__elgg_token=$token&__elgg_ts=$ts\">".elgg_echo('disableall')."</a> "; - $buttons .= "<br /><br />"; -} else { - $buttons = ''; -} - -$buttons .= $category_form; - -// construct page header -?> -<div id="content_header" class="clearfix"> - <div class="content-header-title"><?php echo $title ?></div> - <div class="content-header-options"><?php echo $buttons ?></div> -</div> -<br /> -<?php - -$limit = get_input('limit', 10); -$offset = get_input('offset', 0); - -$plugin_list = get_plugin_list(); -$max = 0; -foreach($plugin_list as $key => $foo) { - if ($key > $max) $max = $key; -} - -// Display list of plugins -$n = 0; -foreach ($installed_plugins as $plugin => $data) { - echo elgg_view('admin/components/plugin', array( - 'plugin' => $plugin, - 'details' => $data, - 'maxorder' => $max, - 'order' => array_search($plugin, $plugin_list) - )); - $n++; -} -?> -<script type="text/javascript"> - $(document).ready(function() { - $('a.manifest_details.link').click(function() { - elgg_slide_toggle($(this), '.plugin_details', '.manifest_file'); - }); - }); -</script>
\ No newline at end of file diff --git a/views/default/admin/plugins/simple.php b/views/default/admin/plugins/simple.php deleted file mode 100644 index 89373fc7d..000000000 --- a/views/default/admin/plugins/simple.php +++ /dev/null @@ -1,94 +0,0 @@ -<?php -/** - * Elgg administration simple plugin screen - * - * Shows an alphabetical list of "simple" plugins. - * - * @package Elgg - * @subpackage Core - */ - -regenerate_plugin_list(); -$installed_plugins = get_installed_plugins(); -$plugin_list = array(); -$title = elgg_view_title(elgg_echo('admin:plugins')); - -foreach ($installed_plugins as $installed_name => $plugin) { - if (!isset($plugin['manifest']['admin_interface']) || $plugin['manifest']['admin_interface'] == 'advanced') { - continue; - } - - $plugin['installed_name'] = $installed_name; - - $plugin_list[$plugin['manifest']['name']] = $plugin; -} - -ksort($plugin_list); -$form_body .= <<<___END - <div id="content_header" class="clearfix"> - <div class="content-header-title">$title</div> - </div> - <ul class="admin_plugins margin-top"> -___END; - -foreach ($plugin_list as $name => $info) { - $manifest = $info['manifest']; - $version_valid = (isset($manifest['elgg_version'])) ? check_plugin_compatibility($manifest['elgg_version']) : FALSE; - if ($info['active']) { - $active_class = 'active'; - $checked = 'checked="checked"'; - } else { - $active_class = 'not_active'; - $checked = ''; - } - - $author = $link = $version = $settings = ''; - - if (isset($manifest['author'])) { - $author = elgg_echo('admin:plugins:author', array($manifest['author'])); - } - - if (isset($manifest['version'])) { - $version = ' | ' . elgg_echo('admin:plugins:version', array($manifest['version'])); - } - - if (isset($manifest['website'])) { - $link = " | <a href=\"{$manifest['website']}\">" . elgg_echo('admin:plugins:plugin_website') . '</a>'; - } - - if (elgg_view_exists("settings/{$info['installed_name']}/edit")) { - $settings_href = elgg_get_site_url()."pg/admin/plugin_settings/{$info['installed_name']}"; - $settings = " | <a class='plugin_settings link' href='$settings_href'>". elgg_echo('settings') ."</a>"; - } - - $form_body .= <<<___END - <li class="plugin_details $active_class"> - <span class="plugin_controls"> - <input type="checkbox" id="{$info['installed_name']}" class="plugin_enabled" $checked name="enabled_plugins[]" value="{$info['installed_name']}"/> - <label for="{$info['installed_name']}">$name</label> - </span> - - <span class="plugin_info"> - <span class="plugin_description"> - {$manifest['description']} - </span> - <span class="plugin_metadata small"> - $author - $version - $link - $settings - </span> - </span> - </li> -___END; -} - -$form_body .= '</ul>'; -$form_body .= elgg_view('input/submit', array('value' => elgg_echo('save'))); -$form_body .= elgg_view('input/reset', array('value' => elgg_echo('reset'), 'class' => 'action-button disabled')); - -echo elgg_view('input/form', array( - 'action' => "action/admin/plugins/simple_update_states", - 'body' => $form_body, - 'class' => 'admin_plugins_simpleview' -));
\ No newline at end of file |
