- Patch #81740 by merlinofchaos, webchick, moshe, neclimdul et al: added package support to the modules page.

5.x
Dries Buytaert 2006-10-05 15:47:57 +00:00
parent c621a60705
commit 18b297abf8
31 changed files with 66 additions and 42 deletions

View File

@ -175,11 +175,13 @@ function _module_build_dependents($files) {
* name - The real name of the module for display purposes.
* description - A brief description of the module.
* dependencies - A space delimited list of the short names (shortname) of other modules this module depends on.
* package - The name of the package of modules this module belongs to.
*
* Example of .info file:
* name = Forum
* description = Enables threaded discussions about general topics.
* dependencies = taxonomy comment
* package = Core - optional
*
* @param $filename
* The file we are parsing. Accepts file with relative or absolute path.

View File

@ -1,3 +1,4 @@
; $Id$
name = Aggregator
description = "Aggregates syndicated content (RSS, RDF, and Atom feeds)."
package = Core - optional

View File

@ -1,4 +1,4 @@
; $Id$
name = Block
description = Controls the boxes that are displayed around the main content.
package = Core - required

View File

@ -1,4 +1,4 @@
; $Id$
name = Blog
description = Enables keeping an easily and regularly updated web page or a blog.
package = Core - optional

View File

@ -1,4 +1,4 @@
; $Id$
name = Blog API
description = Allows users to post content using applications that support XML-RPC blog APIs.
package = Core - optional

View File

@ -1,4 +1,4 @@
; $Id$
name = Book
description = Allows users to collaboratively author a book.
package = Core - optional

View File

@ -1,4 +1,4 @@
; $Id$
name = Comment
description = Allows users to comment on and discuss published content.
package = Core - optional

View File

@ -1,4 +1,4 @@
; $Id$
name = Contact
description = Enables the use of both personal and site-wide contact forms.
package = Core - optional

View File

@ -1,4 +1,4 @@
; $Id$
name = Drupal
description = Lets you register your site with a central server and improve ranking of Drupal projects by posting information on your installed modules and themes; also enables users to log in using a Drupal ID.
package = Core - optional

View File

@ -1,4 +1,4 @@
; $Id$
name = Filter
description = Handles the filtering of content in preparation for display.
package = Core - required

View File

@ -2,3 +2,4 @@
name = Forum
description = Enables threaded discussions about general topics.
dependencies = taxonomy comment
package = Core - optional

View File

@ -1,3 +1,4 @@
; $Id$
name = Help
description = Manages the display of online help.
package = Core - optional

View File

@ -1,4 +1,4 @@
; $Id$
name = Legacy
description = Provides legacy handlers for upgrades from older Drupal installations.
package = Core - optional

View File

@ -1,4 +1,4 @@
; $Id$
name = Locale
description = Enables the translation of the user interface to languages other than English.
package = Core - optional

View File

@ -1,4 +1,4 @@
; $Id$
name = Menu
description = Allows administrators to customize the site navigation menu.
package = Core - optional

View File

@ -1,4 +1,5 @@
; $Id$
name = Node
description = Allows content to be submitted to the site and displayed on pages.
package = Core - required

View File

@ -1,4 +1,4 @@
; $Id$
name = Path
description = Allows users to rename URLs.
package = Core - optional

View File

@ -1,4 +1,4 @@
; $Id$
name = Ping
description = Alerts other sites when your site has been updated.
package = Core - optional

View File

@ -1,4 +1,4 @@
; $Id$
name = Poll
description = Allows your site to capture votes on different topics in the form of multiple choice questions.
package = Core - optional

View File

@ -1,4 +1,4 @@
; $Id$
name = Profile
description = Supports configurable user profiles.
package = Core - optional

View File

@ -1,4 +1,4 @@
; $Id$
name = Search
description = Enables site-wide keyword searching.
package = Core - optional

View File

@ -1,4 +1,4 @@
; $Id$
name = Statistics
description = Logs access statistics for your site.
package = Core - optional

View File

@ -39,6 +39,12 @@ div.admin .expert-link {
padding-right: 4px;
}
table.package {
width: 100%;
}
table.package .description {
width: 100%;
}
div.admin-dependencies, div.admin-required {
font-size: 0.9em;
color: #444;

View File

@ -1,4 +1,4 @@
; $Id$
name = System
description = Handles general site configuration for administrators.
package = Core - required

View File

@ -1333,11 +1333,6 @@ function system_modules($form_values = NULL) {
// Merge in required modules.
$modules_required = array('block', 'filter', 'node', 'system', 'user', 'watchdog');
foreach ($modules_required as $required) {
$form['description'][$required]['core'] = array(
'#value' => t('Required for Drupal core'),
'#prefix' => '<div class="admin-required">',
'#suffix' => '</div>',
);
$disabled[] = $required;
$form['disabled_modules']['#value'][$required] = TRUE;
}
@ -1526,18 +1521,7 @@ function theme_system_modules($form) {
return drupal_render($form);
}
foreach (element_children($form['name']) as $key) {
$row = array();
$row[] = array('data' => drupal_render($form['status'][$key]), 'align' => 'center');
if (module_exists('throttle')) {
$row[] = array('data' => drupal_render($form['throttle'][$key]), 'align' => 'center');
}
$row[] = '<strong>'. drupal_render($form['name'][$key]) .'</strong>';
$row[] = drupal_render($form['description'][$key]);
$rows[] = $row;
}
// Individual table headers.
$header = array(t('Enabled'));
if (module_exists('throttle')) {
$header[] = t('Throttle');
@ -1545,7 +1529,35 @@ function theme_system_modules($form) {
$header[] = t('Name');
$header[] = t('Description');
$output = theme('table', $header, $rows);
// Pull package information from module list and start grouping modules.
$modules = $form['validation_modules']['#value'];
foreach ($modules as $module) {
if (!isset($module->info['package'])) {
$module->info['package'] = 'Uncategorized';
}
$packages[$module->info['package']][$module->name] = $module->info;
}
ksort($packages);
// Display packages.
$output = '';
foreach ($packages as $package => $modules) {
$rows = array();
foreach ($modules as $key => $module) {
$row = array();
$row[] = array('data' => drupal_render($form['status'][$key]), 'align' => 'center');
if (module_exists('throttle')) {
$row[] = array('data' => drupal_render($form['throttle'][$key]), 'align' => 'center');
}
$row[] = '<strong>'. drupal_render($form['name'][$key]) .'</strong>';
$row[] = array('data' => drupal_render($form['description'][$key]), 'class' => 'description');
$rows[] = $row;
}
$output .= '<h2>'. t($package) .'</h2>';
$output .= theme('table', $header, $rows, array('class' => 'package'));
}
$output .= drupal_render($form);
return $output;
}

View File

@ -1,4 +1,4 @@
; $Id$
name = Taxonomy
description = Enables the categorization of content.
package = Core - optional

View File

@ -1,4 +1,4 @@
; $Id$
name = Throttle
description = Handles the auto-throttling mechanism, to control site congestion.
package = Core - optional

View File

@ -1,4 +1,4 @@
; $Id$
name = Tracker
description = Enables tracking of recent posts for users.
package = Core - optional

View File

@ -1,4 +1,4 @@
; $Id$
name = Upload
description = Allows users to upload and attach files to content.
package = Core - optional

View File

@ -1,4 +1,4 @@
; $Id$
name = User
description = Manages the user registration and login system.
package = Core - required

View File

@ -1,4 +1,4 @@
; $Id$
name = Watchdog
description = Logs and records system events.
package = Core - required