Commit 18b297ab authored by Dries's avatar Dries

- Patch #81740 by merlinofchaos, webchick, moshe, neclimdul et al: added...

- Patch #81740 by merlinofchaos, webchick, moshe, neclimdul et al: added package support to the modules page.
parent c621a607
......@@ -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.
......
; $Id$
name = Aggregator
description = "Aggregates syndicated content (RSS, RDF, and Atom feeds)."
package = Core - optional
; $Id$
name = Block
description = Controls the boxes that are displayed around the main content.
package = Core - required
; $Id$
name = Blog
description = Enables keeping an easily and regularly updated web page or a blog.
package = Core - optional
; $Id$
name = Blog API
description = Allows users to post content using applications that support XML-RPC blog APIs.
package = Core - optional
; $Id$
name = Book
description = Allows users to collaboratively author a book.
package = Core - optional
; $Id$
name = Comment
description = Allows users to comment on and discuss published content.
package = Core - optional
; $Id$
name = Contact
description = Enables the use of both personal and site-wide contact forms.
package = Core - optional
; $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
; $Id$
name = Filter
description = Handles the filtering of content in preparation for display.
package = Core - required
......@@ -2,3 +2,4 @@
name = Forum
description = Enables threaded discussions about general topics.
dependencies = taxonomy comment
package = Core - optional
; $Id$
name = Help
description = Manages the display of online help.
package = Core - optional
; $Id$
name = Legacy
description = Provides legacy handlers for upgrades from older Drupal installations.
package = Core - optional
; $Id$
name = Locale
description = Enables the translation of the user interface to languages other than English.
package = Core - optional
; $Id$
name = Menu
description = Allows administrators to customize the site navigation menu.
package = Core - optional
; $Id$
name = Node
description = Allows content to be submitted to the site and displayed on pages.
package = Core - required
; $Id$
name = Path
description = Allows users to rename URLs.
package = Core - optional
; $Id$
name = Ping
description = Alerts other sites when your site has been updated.
package = Core - optional
; $Id$
name = Poll
description = Allows your site to capture votes on different topics in the form of multiple choice questions.
package = Core - optional
; $Id$
name = Profile
description = Supports configurable user profiles.
package = Core - optional
; $Id$
name = Search
description = Enables site-wide keyword searching.
package = Core - optional
; $Id$
name = Statistics
description = Logs access statistics for your site.
package = Core - optional
......@@ -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;
......
; $Id$
name = System
description = Handles general site configuration for administrators.
package = Core - required
......@@ -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,7 +1521,29 @@ function theme_system_modules($form) {
return drupal_render($form);
}
foreach (element_children($form['name']) as $key) {
// Individual table headers.
$header = array(t('Enabled'));
if (module_exists('throttle')) {
$header[] = t('Throttle');
}
$header[] = t('Name');
$header[] = t('Description');
// 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');
......@@ -1534,18 +1551,13 @@ function theme_system_modules($form) {
$row[] = array('data' => drupal_render($form['throttle'][$key]), 'align' => 'center');
}
$row[] = '<strong>'. drupal_render($form['name'][$key]) .'</strong>';
$row[] = drupal_render($form['description'][$key]);
$row[] = array('data' => drupal_render($form['description'][$key]), 'class' => 'description');
$rows[] = $row;
}
$header = array(t('Enabled'));
if (module_exists('throttle')) {
$header[] = t('Throttle');
$output .= '<h2>'. t($package) .'</h2>';
$output .= theme('table', $header, $rows, array('class' => 'package'));
}
$header[] = t('Name');
$header[] = t('Description');
$output = theme('table', $header, $rows);
$output .= drupal_render($form);
return $output;
}
......
; $Id$
name = Taxonomy
description = Enables the categorization of content.
package = Core - optional
; $Id$
name = Throttle
description = Handles the auto-throttling mechanism, to control site congestion.
package = Core - optional
; $Id$
name = Tracker
description = Enables tracking of recent posts for users.
package = Core - optional
; $Id$
name = Upload
description = Allows users to upload and attach files to content.
package = Core - optional
; $Id$
name = User
description = Manages the user registration and login system.
package = Core - required
; $Id$
name = Watchdog
description = Logs and records system events.
package = Core - required
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment