aboutsummaryrefslogtreecommitdiff
path: root/views/default/admin/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/admin/plugins')
-rw-r--r--views/default/admin/plugins/advanced.php129
-rw-r--r--views/default/admin/plugins/simple.php111
2 files changed, 0 insertions, 240 deletions
diff --git a/views/default/admin/plugins/advanced.php b/views/default/admin/plugins/advanced.php
deleted file mode 100644
index 2e05ae7ee..000000000
--- a/views/default/admin/plugins/advanced.php
+++ /dev/null
@@ -1,129 +0,0 @@
-<?php
-/**
- * Elgg administration advanced plugin screen
- *
- * Shows a list of all plugins sorted by load order.
- *
- * @package Elgg.Core
- * @subpackage Admin.Plugins
- */
-
-elgg_generate_plugin_entities();
-$installed_plugins = elgg_get_plugins('any');
-$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 $plugin) {
- if (!$plugin->isValid()) {
- continue;
- }
-
- $plugin_categories = $plugin->manifest->getCategories();
-
- // handle plugins that don't declare categories
- // unset them here because this is the list we foreach
- if ($show_category && !in_array($show_category, $plugin_categories)) {
- unset($installed_plugins[$id]);
- }
-
- if (isset($plugin_categories)) {
- 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_dropdown = elgg_view('input/dropdown', array(
- 'internalname' => 'category',
- 'options_values' => $categories,
- 'value' => $show_category
-));
-
-$category_button = elgg_view('input/submit', array(
- 'value' => elgg_echo('filter'),
- 'class' => 'elgg-action-button'
-));
-
-$category_form = elgg_view('input/form', array(
- 'body' => $category_dropdown . $category_button
-));
-
-// @todo Until "en/deactivate all" means "All plugins on this page" hide when not looking at all.
-if (!isset($show_category) || empty($show_category)) {
- $activate_url = "{$CONFIG->url}action/admin/plugins/activate_all?__elgg_token=$token&amp;__elgg_ts=$ts";
- $deactivate_url = "{$CONFIG->url}action/admin/plugins/deactivate_all?__elgg_token=$token&amp;__elgg_ts=$ts";
-
- $buttons = "<a class='elgg-action-button' href=\"$activate_url\">" . elgg_echo('admin:plugins:activate_all') . '</a> ';
- $buttons .= "<a class='elgg-action-button disabled' href=\"$deactivate_url\">" . elgg_echo('admin:plugins:deactivate_all') . '</a> ';
- $buttons .= "<br /><br />";
-} else {
- $buttons = '';
-}
-
-$buttons .= $category_form;
-
-// construct page header
-?>
-<div id="content_header" class="clearfix">
- <div class="content-header-options"><?php echo $buttons ?></div>
-</div>
-<br />
-<?php
-
-// Display list of plugins
-foreach ($installed_plugins as $plugin) {
- $view = ($plugin->isValid()) ? 'admin/components/plugin' : 'admin/components/invalid_plugin';
- echo elgg_view($view, array(
- 'plugin' => $plugin
- ));
-}
-?>
-
-<script type="text/javascript">
- $(document).ready(function() {
- $('a.manifest_details.link').click(function() {
- elgg_slide_toggle($(this), '.plugin_details', '.manifest_file');
- });
-
-
- $('.elgg-plugin-screenshot a').click(function(e) {
- e.preventDefault();
- var lb = $('.elgg-plugin-screenshot-lightbox');
-
- if (lb.length < 1) {
- $('body').append('<div class="elgg-plugin-screenshot-lightbox"></div>');
- lb = $('.elgg-plugin-screenshot-lightbox');
-
- lb.click(function() {
- lb.hide();
- });
-
- $(document).click(function(e) {
- var target = $(e.target);
- if (target.is('a') && target.hasClass('elgg-plugin-screenshot-lightbox')) {
- lb.hide();
- e.preventDefault();
- }
- });
- }
-
- var img = '<img class="pas" src="' + $(this).attr('href') + '">';
- lb.html(img);
-
- top_pos = $(window).scrollTop() + 10 + 'px';
- left_pos = $(window).scrollLeft() + 5 + 'px';
-
- lb.css('top', top_pos).css('left', left_pos).show();
- });
- });
-</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 e9d7d5ffb..000000000
--- a/views/default/admin/plugins/simple.php
+++ /dev/null
@@ -1,111 +0,0 @@
-<?php
-/**
- * Elgg administration simple plugin screen
- *
- * Shows an alphabetical list of "simple" plugins.
- *
- * @package Elgg
- * @subpackage Core
- */
-
-elgg_generate_plugin_entities();
-$installed_plugins = elgg_get_plugins('any');
-$plugin_list = array();
-
-foreach ($installed_plugins as $plugin) {
- if (!$plugin->isValid()) {
- continue;
- }
- $interface = $plugin->manifest->getAdminInterface();
- if ($interface == 'simple') {
- $plugin_list[$plugin->manifest->getName()] = $plugin;
- }
-}
-
-ksort($plugin_list);
-
-$form_body .= <<<___END
- <ul class="admin_plugins margin-top">
-___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 .= '<p>' . elgg_echo('admin:plugins:simple:cannot_activate') . '</p>';
- }
-
- $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 = " | <a href=\"$website\">" . elgg_echo('admin:plugins:plugin_website') . '</a>';
- }
-
- if (elgg_view_exists("settings/$plugin_id/edit")) {
- $settings_href = elgg_get_site_url() . "pg/admin/plugin_settings/$plugin_id";
- $settings_html = " | <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="$plugin_guid" class="plugin_enabled" $checked $disabled name="active_plugin_guids[]" value="$plugin_guid"/>
- <label for="$plugin_guid">$name</label>
- </span>
-
- <span class="plugin_info">
- <span class="plugin_description">
- $description
- </span>
- <span class="plugin_metadata small">
- $author_html
- $version_html
- $link_html
- $settings_html
- </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' => 'elgg-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