- Patch #598758 by stBorchert, sun, pwolanin, eigentor, TheRec, seutje: add link to the permissions and configuration page of each module from the module configuration page. Great team work!
parent
a6cca24d2a
commit
a239296cbc
|
@ -12,3 +12,4 @@ files[] = aggregator.parser.inc
|
|||
files[] = aggregator.processor.inc
|
||||
files[] = aggregator.install
|
||||
files[] = aggregator.test
|
||||
configure = admin/config/services/aggregator/settings
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
; $Id$
|
||||
|
||||
name = Block
|
||||
description = Controls the visual building blocks a page is constructed with. Blocks are boxes of content rendered into an area, or region, of a web page.
|
||||
package = Core
|
||||
|
@ -9,3 +8,4 @@ files[] = block.module
|
|||
files[] = block.admin.inc
|
||||
files[] = block.install
|
||||
files[] = block.test
|
||||
configure = admin/structure/block
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
; $Id$
|
||||
|
||||
name = Book
|
||||
description = Allows users to create and organize related content in an outline.
|
||||
package = Core
|
||||
|
@ -10,3 +9,4 @@ files[] = book.admin.inc
|
|||
files[] = book.pages.inc
|
||||
files[] = book.install
|
||||
files[] = book.test
|
||||
configure = admin/content/book/settings
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
; $Id$
|
||||
|
||||
name = Comment
|
||||
description = Allows users to comment on and discuss published content.
|
||||
package = Core
|
||||
|
@ -11,3 +10,4 @@ files[] = comment.pages.inc
|
|||
files[] = comment.install
|
||||
files[] = comment.test
|
||||
files[] = comment.tokens.inc
|
||||
configure = admin/content/comment
|
||||
|
|
|
@ -9,3 +9,4 @@ files[] = contact.admin.inc
|
|||
files[] = contact.pages.inc
|
||||
files[] = contact.install
|
||||
files[] = contact.test
|
||||
configure = admin/structure/contact
|
||||
|
|
|
@ -6,3 +6,4 @@ package = Core
|
|||
version = VERSION
|
||||
files[] = dashboard.module
|
||||
dependencies[] = block
|
||||
configure = admin/dashboard/customize
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;h $Id$
|
||||
; $Id$
|
||||
name = Filter
|
||||
description = Filters content in preparation for display.
|
||||
package = Core
|
||||
|
@ -10,3 +10,4 @@ files[] = filter.pages.inc
|
|||
files[] = filter.install
|
||||
files[] = filter.test
|
||||
required = TRUE
|
||||
configure = admin/config/content/formats
|
||||
|
|
|
@ -11,3 +11,4 @@ files[] = forum.admin.inc
|
|||
files[] = forum.pages.inc
|
||||
files[] = forum.install
|
||||
files[] = forum.test
|
||||
configure = admin/structure/forum
|
||||
|
|
|
@ -11,3 +11,4 @@ files[] = image.effects.inc
|
|||
files[] = image.field.inc
|
||||
files[] = image.install
|
||||
files[] = image.test
|
||||
configure = admin/config/media/image-styles
|
||||
|
|
|
@ -8,3 +8,4 @@ files[] = locale.module
|
|||
files[] = locale.install
|
||||
files[] = locale.field.inc
|
||||
files[] = locale.test
|
||||
configure = admin/config/regional/language
|
||||
|
|
|
@ -8,3 +8,4 @@ files[] = menu.module
|
|||
files[] = menu.admin.inc
|
||||
files[] = menu.install
|
||||
files[] = menu.test
|
||||
configure = admin/structure/menu
|
||||
|
|
|
@ -12,3 +12,4 @@ files[] = node.install
|
|||
files[] = node.test
|
||||
files[] = node.tokens.inc
|
||||
required = TRUE
|
||||
configure = admin/structure/types
|
||||
|
|
|
@ -7,3 +7,4 @@ core = 7.x
|
|||
files[] = path.module
|
||||
files[] = path.admin.inc
|
||||
files[] = path.test
|
||||
configure = admin/config/search/path
|
||||
|
|
|
@ -9,3 +9,4 @@ files[] = profile.admin.inc
|
|||
files[] = profile.pages.inc
|
||||
files[] = profile.install
|
||||
files[] = profile.test
|
||||
configure = admin/config/people/profile
|
||||
|
|
|
@ -10,3 +10,4 @@ files[] = search.pages.inc
|
|||
files[] = search.install
|
||||
files[] = search.test
|
||||
files[] = search.extender.inc
|
||||
configure = admin/config/search/settings
|
||||
|
|
|
@ -7,3 +7,4 @@ core = 7.x
|
|||
files[] = shortcut.module
|
||||
files[] = shortcut.admin.inc
|
||||
files[] = shortcut.install
|
||||
configure = admin/config/system/shortcut
|
||||
|
|
|
@ -9,6 +9,7 @@ files[] = simpletest.pages.inc
|
|||
files[] = simpletest.install
|
||||
files[] = simpletest.test
|
||||
files[] = drupal_web_test_case.php
|
||||
configure = admin/config/development/testing/settings
|
||||
|
||||
; Tests in tests directory.
|
||||
files[] = tests/actions.test
|
||||
|
|
|
@ -10,3 +10,4 @@ files[] = statistics.pages.inc
|
|||
files[] = statistics.install
|
||||
files[] = statistics.test
|
||||
files[] = statistics.tokens.inc
|
||||
configure = admin/config/system/statistics
|
||||
|
|
|
@ -720,10 +720,37 @@ function system_modules($form, $form_state = array()) {
|
|||
// Generate link for module's help page, if there is one.
|
||||
if ($help_arg && $module->status && in_array($filename, module_implements('help'))) {
|
||||
if (module_invoke($filename, 'help', "admin/help#$filename", $help_arg)) {
|
||||
// Module has a help page.
|
||||
$extra['help'] = theme('more_help_link', array('url' => url("admin/help/$filename")));
|
||||
$extra['links']['help'] = array(
|
||||
'#type' => 'link',
|
||||
'#title' => t('Help'),
|
||||
'#href' => "admin/help/$filename",
|
||||
'#options' => array('attributes' => array('class' => array('module-link', 'module-link-help'), 'title' => t('Help'))),
|
||||
);
|
||||
}
|
||||
}
|
||||
// Generate link for module's permission, if the user has access to it.
|
||||
if ($module->status && user_access('administer permissions') && in_array($filename, module_implements('permission'))) {
|
||||
$extra['links']['permissions'] = array(
|
||||
'#type' => 'link',
|
||||
'#title' => t('Permissions'),
|
||||
'#href' => 'admin/config/people/permissions',
|
||||
'#options' => array('fragment' => 'module-' . $filename, 'attributes' => array('class' => array('module-link', 'module-link-permissions'), 'title' => t('Configure permissions'))),
|
||||
);
|
||||
}
|
||||
// Generate link for module's configuration page, if the module provides
|
||||
// one.
|
||||
if ($module->status && isset($module->info['configure'])) {
|
||||
$configure_link = menu_get_item($module->info['configure']);
|
||||
if ($configure_link['access']) {
|
||||
$extra['links']['configure'] = array(
|
||||
'#type' => 'link',
|
||||
'#title' => t('Configure'),
|
||||
'#href' => $configure_link['href'],
|
||||
'#options' => array('attributes' => array('class' => array('module-link', 'module-link-configure'), 'title' => $configure_link['description'])),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Mark dependents disabled so the user cannot remove required modules.
|
||||
$dependents = array();
|
||||
// If this module is required by other modules, list those, and then make it
|
||||
|
@ -754,6 +781,7 @@ function system_modules($form, $form_state = array()) {
|
|||
t('Name'),
|
||||
t('Version'),
|
||||
t('Description'),
|
||||
array('data' => t('Operations'), 'colspan' => 3),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -784,7 +812,7 @@ function _system_modules_build_row($info, $extra) {
|
|||
'required_by' => array(),
|
||||
'disabled' => FALSE,
|
||||
'enabled' => FALSE,
|
||||
'help' => '',
|
||||
'links' => array(),
|
||||
);
|
||||
$form = array(
|
||||
'#tree' => TRUE,
|
||||
|
@ -843,12 +871,11 @@ function _system_modules_build_row($info, $extra) {
|
|||
$form['description']['#markup'] .= theme('system_modules_incompatible', array('message' => $status_long));
|
||||
}
|
||||
|
||||
// Show a "more help" link for modules that have them.
|
||||
if ($extra['help']) {
|
||||
$form['help'] = array(
|
||||
'#markup' => $extra['help'],
|
||||
);
|
||||
// Build operation links.
|
||||
foreach (array('help', 'permissions', 'configure') as $key) {
|
||||
$form['links'][$key] = (isset($extra['links'][$key]) ? $extra['links'][$key] : array());
|
||||
}
|
||||
|
||||
return $form;
|
||||
}
|
||||
|
||||
|
@ -2307,14 +2334,8 @@ function theme_system_modules_fieldset($variables) {
|
|||
}
|
||||
$row[] = $label . '><strong>' . drupal_render($module['name']) . '</strong></label>';
|
||||
$row[] = drupal_render($module['version']);
|
||||
$description = '';
|
||||
// If we have help, it becomes the first part
|
||||
// of the description - with CSS, it is float: right'd.
|
||||
if (isset($module['help'])) {
|
||||
$description = '<div class="module-help">' . drupal_render($module['help']) . '</div>';
|
||||
}
|
||||
// Add the description, along with any modules it requires.
|
||||
$description .= drupal_render($module['description']);
|
||||
$description = drupal_render($module['description']);
|
||||
if ($module['#requires']) {
|
||||
$description .= '<div class="admin-requirements">' . t('Requires: !module-list', array('!module-list' => implode(', ', $module['#requires']))) . '</div>';
|
||||
}
|
||||
|
@ -2322,6 +2343,10 @@ function theme_system_modules_fieldset($variables) {
|
|||
$description .= '<div class="admin-requirements">' . t('Required by: !module-list', array('!module-list' => implode(', ', $module['#required_by']))) . '</div>';
|
||||
}
|
||||
$row[] = array('data' => $description, 'class' => array('description'));
|
||||
// Display links (such as help or permissions) in their own columns.
|
||||
foreach (array('help', 'permissions', 'configure') as $key) {
|
||||
$row[] = array('data' => drupal_render($module['links'][$key]), 'class' => array($key));
|
||||
}
|
||||
$rows[] = $row;
|
||||
}
|
||||
|
||||
|
|
|
@ -159,10 +159,22 @@ tr.merge-up, tr.merge-up td, tr.merge-up th {
|
|||
.more-help-link {
|
||||
text-align: right; /* LTR */
|
||||
}
|
||||
.more-help-link a {
|
||||
.more-help-link a, a.module-link {
|
||||
padding: 1px 0 1px 20px; /* LTR */
|
||||
}
|
||||
a.module-link {
|
||||
display: block;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.more-help-link a, a.module-link-help {
|
||||
background: url(../../misc/help.png) 0 50% no-repeat; /* LTR */
|
||||
}
|
||||
a.module-link-permissions {
|
||||
background: url(../../misc/permissions.png) 0 50% no-repeat; /* LTR */
|
||||
}
|
||||
a.module-link-configure {
|
||||
background: url(../../misc/configure.png) 0 50% no-repeat; /* LTR */
|
||||
}
|
||||
.more-link {
|
||||
text-align: right; /* LTR */
|
||||
}
|
||||
|
|
|
@ -16,3 +16,4 @@ files[] = system.tokens.inc
|
|||
files[] = system.updater.inc
|
||||
files[] = mail.sending.inc
|
||||
required = TRUE
|
||||
configure = admin/config/system
|
||||
|
|
|
@ -10,3 +10,4 @@ files[] = taxonomy.pages.inc
|
|||
files[] = taxonomy.install
|
||||
files[] = taxonomy.test
|
||||
files[] = taxonomy.tokens.inc
|
||||
configure = admin/structure/taxonomy
|
||||
|
|
|
@ -8,3 +8,4 @@ files[] = trigger.module
|
|||
files[] = trigger.admin.inc
|
||||
files[] = trigger.install
|
||||
files[] = trigger.test
|
||||
configure = admin/structure/trigger
|
||||
|
|
|
@ -13,3 +13,4 @@ files[] = update.manager.inc
|
|||
files[] = update.report.inc
|
||||
files[] = update.settings.inc
|
||||
files[] = update.test
|
||||
configure = admin/reports/updates/settings
|
||||
|
|
|
@ -9,3 +9,4 @@ files[] = upload.admin.inc
|
|||
files[] = upload.install
|
||||
files[] = upload.test
|
||||
files[] = upload.tokens.inc
|
||||
configure = admin/config/media/uploads
|
||||
|
|
|
@ -11,3 +11,4 @@ files[] = user.install
|
|||
files[] = user.test
|
||||
files[] = user.tokens.inc
|
||||
required = TRUE
|
||||
configure = admin/config/people
|
||||
|
|
Loading…
Reference in New Issue