From 82593cd2bc056da73caa1b1e981c5a9ead0f1bf2 Mon Sep 17 00:00:00 2001 From: brettp Date: Wed, 27 Apr 2011 02:37:16 +0000 Subject: Refs #3362. Plugins don't check deps upon boot. Made package and manifest private properties of ElggPlugin and added ->getPackage() and ->getManifest(). git-svn-id: http://code.elgg.org/elgg/trunk@9030 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/object/plugin/elements/dependencies.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'views/default/object/plugin/elements/dependencies.php') diff --git a/views/default/object/plugin/elements/dependencies.php b/views/default/object/plugin/elements/dependencies.php index 11a441a4a..b5cdaf8b6 100644 --- a/views/default/object/plugin/elements/dependencies.php +++ b/views/default/object/plugin/elements/dependencies.php @@ -9,7 +9,7 @@ */ $plugin = elgg_extract('plugin', $vars, false); -$deps = $plugin->package->checkDependencies(true); +$deps = $plugin->getPackage()->checkDependencies(true); $columns = array('type', 'name', 'expected_value', 'local_value', 'comment'); -- cgit v1.2.3 From 4661a25efbdec0680681d76fd1da41519d4d7eb9 Mon Sep 17 00:00:00 2001 From: cash Date: Thu, 28 Apr 2011 19:53:05 +0000 Subject: Refs #3236 removed elgg-states-* from admin css since it was overaggressive git-svn-id: http://code.elgg.org/elgg/trunk@9045 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/css/admin.php | 81 +++++++++------------- .../object/plugin/elements/dependencies.php | 4 +- 2 files changed, 34 insertions(+), 51 deletions(-) (limited to 'views/default/object/plugin/elements/dependencies.php') diff --git a/views/default/css/admin.php b/views/default/css/admin.php index 3a9db0fd0..ae3002dcb 100644 --- a/views/default/css/admin.php +++ b/views/default/css/admin.php @@ -226,6 +226,17 @@ table.mceLayout { border: 2px solid #ddd; cursor: pointer; } +.elgg-message.elgg-state-error { + background: #fbe3e4; + color: #8a1f11; + border-color: #fbc2c4; + font-weight: bold; +} +.elgg-message.elgg-state-success { + background: #e6efc2; + color: #264409; + border-color: #c6d880; +} /* *************************************** BODY @@ -685,6 +696,16 @@ input[type="submit"]:hover, .elgg-button-submit:hover, .elgg-button-action:hover .elgg-widgets-add-panel li a { display: block; } +.elgg-widget-single.elgg-state-available { + color: #333; + cursor: pointer; +} +.elgg-widget-single.elgg-state-available:hover { + border-color: #aaa; +} +.elgg-widget-single.elgg-state-unavailable { + color: #888; +} .elgg-module-widget { background-color: #dedede; @@ -1044,58 +1065,11 @@ a.elgg-longtext-control { .right {float:right} .elgg-toggle {cursor:pointer} -/* *************************************** - STATES -*************************************** */ - -.elgg-state-active { - background:#ccc; - color: #333; -} - -.elgg-state-inactive { - background:#dedede; -} - -.elgg-state-available { - color: #333; - cursor: pointer; -} - -.elgg-state-available:hover { - border-color: #aaa; -} - -.elgg-state-unavailable { - color: #888; -} - -.elgg-state-success { - background: #e6efc2; - color: #264409; - border-color: #c6d880; -} - -.elgg-state-error { - background: #fbe3e4; - color: #8a1f11; - border-color: #fbc2c4; - font-weight: bold; -} - -p.elgg-state-error { - padding: 5px; -} - .elgg-state-draggable .elgg-head { cursor: move; } - -.elgg-state-selected {} -.elgg-state-disabled {} - /* *************************************** ADMIN MISC *************************************** */ @@ -1134,8 +1108,8 @@ form.admin_plugins_simpleview .elgg-button-submit { margin-right: 10px; } ul.admin_plugins { - margin-bottom:0; - padding-left:0; + margin-bottom: 0; + padding-left: 0; list-style: none; } .elgg-plugin { @@ -1185,6 +1159,15 @@ ul.admin_plugins { .elgg-plugin.elgg-state-active { background: white; } +.elgg-plugin.elgg-state-inactive { + background: #dedede; +} +.elgg-dependency.elgg-state-error { + background: #fbe3e4; + color: #8a1f11; + border-color: #fbc2c4; + font-weight: bold; +} .admin_notices { padding-bottom: 15px; diff --git a/views/default/object/plugin/elements/dependencies.php b/views/default/object/plugin/elements/dependencies.php index b5cdaf8b6..f4d1ccc5a 100644 --- a/views/default/object/plugin/elements/dependencies.php +++ b/views/default/object/plugin/elements/dependencies.php @@ -28,9 +28,9 @@ foreach ($deps as $dep) { $type = $dep['type']; if ($dep['status']) { - $class = "elgg-state-success elgg-dependency-$type"; + $class = "elgg-state-success elgg-dependency elgg-dependency-$type"; } else { - $class = "elgg-state-error elgg-dependency-$type"; + $class = "elgg-state-error elgg-dependency elgg-dependency-$type"; } echo ""; -- cgit v1.2.3 From 727ba0b25e7b5737dcffb3061b96dba5f1a7f034 Mon Sep 17 00:00:00 2001 From: cash Date: Thu, 9 Jun 2011 19:11:55 +0000 Subject: Refs #2871 only showing links for changing priority when all plugins are shown in priority order git-svn-id: http://code.elgg.org/elgg/trunk@9154 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/admin/plugins/advanced.php | 11 ++- views/default/object/plugin/advanced.php | 100 +++++++++++---------- .../object/plugin/elements/dependencies.php | 2 +- 3 files changed, 65 insertions(+), 48 deletions(-) (limited to 'views/default/object/plugin/elements/dependencies.php') diff --git a/views/default/admin/plugins/advanced.php b/views/default/admin/plugins/advanced.php index deae9dcdd..9f426fae2 100644 --- a/views/default/admin/plugins/advanced.php +++ b/views/default/admin/plugins/advanced.php @@ -156,7 +156,16 @@ $buttons .= $category_form . $sort_form;
0, + 'full_view' => true, + 'list_type_toggle' => false, + 'pagination' => false, +); +if ($show_category == 'all' && $sort == 'priority') { + $options['display_reordering'] = true; +} +echo elgg_view_entity_list($plugin_list, $options); ?>
\ No newline at end of file diff --git a/views/default/object/plugin/advanced.php b/views/default/object/plugin/advanced.php index 56e680ad5..21c99f619 100644 --- a/views/default/object/plugin/advanced.php +++ b/views/default/object/plugin/advanced.php @@ -5,11 +5,15 @@ * This file renders a plugin for the admin screen, including active/deactive, * manifest details & display plugin settings. * + * @uses $vars['entity'] + * @uses $vars['display_reordering'] Do we display the priority reordering links? + * * @package Elgg.Core * @subpackage Plugins */ $plugin = $vars['entity']; +$reordering = elgg_extract('display_reordering', $vars, false); $priority = $plugin->getPriority(); $active = $plugin->isActive(); @@ -24,58 +28,60 @@ $token = generate_action_token($ts); // build reordering links $links = ''; -// top and up link only if not at top -if ($priority > 1) { - $top_url = elgg_http_add_url_query_elements($actions_base . 'set_priority', array( - 'plugin_guid' => $plugin->guid, - 'priority' => 'first', - 'is_action' => true - )); +if ($reordering) { + // top and up link only if not at top + if ($priority > 1) { + $top_url = elgg_http_add_url_query_elements($actions_base . 'set_priority', array( + 'plugin_guid' => $plugin->guid, + 'priority' => 'first', + 'is_action' => true + )); - $links .= "
  • " . elgg_view('output/url', array( - 'href' => $top_url, - 'text' => elgg_echo('top'), - 'is_action' => true - )) . "
  • "; + $links .= "
  • " . elgg_view('output/url', array( + 'href' => $top_url, + 'text' => elgg_echo('top'), + 'is_action' => true + )) . "
  • "; - $up_url = elgg_http_add_url_query_elements($actions_base . 'set_priority', array( - 'plugin_guid' => $plugin->guid, - 'priority' => '-1', - 'is_action' => true - )); + $up_url = elgg_http_add_url_query_elements($actions_base . 'set_priority', array( + 'plugin_guid' => $plugin->guid, + 'priority' => '-1', + 'is_action' => true + )); - $links .= "
  • " . elgg_view('output/url', array( - 'href' => $up_url, - 'text' => elgg_echo('up'), - 'is_action' => true - )) . "
  • "; -} + $links .= "
  • " . elgg_view('output/url', array( + 'href' => $up_url, + 'text' => elgg_echo('up'), + 'is_action' => true + )) . "
  • "; + } -// down and bottom links only if not at bottom -if ($priority < $max_priority) { - $down_url = elgg_http_add_url_query_elements($actions_base . 'set_priority', array( - 'plugin_guid' => $plugin->guid, - 'priority' => '+1', - 'is_action' => true - )); + // down and bottom links only if not at bottom + if ($priority < $max_priority) { + $down_url = elgg_http_add_url_query_elements($actions_base . 'set_priority', array( + 'plugin_guid' => $plugin->guid, + 'priority' => '+1', + 'is_action' => true + )); - $links .= "
  • " . elgg_view('output/url', array( - 'href' => $down_url, - 'text' => elgg_echo('down'), - 'is_action' => true - )) . "
  • "; + $links .= "
  • " . elgg_view('output/url', array( + 'href' => $down_url, + 'text' => elgg_echo('down'), + 'is_action' => true + )) . "
  • "; - $bottom_url = elgg_http_add_url_query_elements($actions_base . 'set_priority', array( - 'plugin_guid' => $plugin->guid, - 'priority' => 'last', - 'is_action' => true - )); + $bottom_url = elgg_http_add_url_query_elements($actions_base . 'set_priority', array( + 'plugin_guid' => $plugin->guid, + 'priority' => 'last', + 'is_action' => true + )); - $links .= "
  • " . elgg_view('output/url', array( - 'href' => $bottom_url, - 'text' => elgg_echo('bottom'), - 'is_action' => true - )) . "
  • "; + $links .= "
  • " . elgg_view('output/url', array( + 'href' => $bottom_url, + 'text' => elgg_echo('bottom'), + 'is_action' => true + )) . "
  • "; + } } // activate / deactivate links @@ -181,9 +187,11 @@ if ($files) {
    + +
    diff --git a/views/default/object/plugin/elements/dependencies.php b/views/default/object/plugin/elements/dependencies.php index f4d1ccc5a..5f4aa4392 100644 --- a/views/default/object/plugin/elements/dependencies.php +++ b/views/default/object/plugin/elements/dependencies.php @@ -20,7 +20,7 @@ foreach ($columns as $column) { echo "$column"; } -echo ''; +echo ''; $row = 'odd'; foreach ($deps as $dep) { -- cgit v1.2.3