diff --git a/core/modules/system/system.admin.css b/core/modules/system/system.admin.css index 957d3e08d981f894e9524ddd632f232d80d72021..a7f2cbd4efcc94f1c12f6c286ad981e618010c0e 100644 --- a/core/modules/system/system.admin.css +++ b/core/modules/system/system.admin.css @@ -58,13 +58,80 @@ small .admin-link:after { /** * Modules page. */ +#system-modules table { + table-layout: fixed; +} #system-modules div.incompatible { font-weight: bold; } +#system-modules th.checkbox { + width: 4%; +} +#system-modules th.name { + width: 25%; +} +#system-modules td { + vertical-align: top; +} +#system-modules .expand .inner { + background: transparent url(../../misc/menu-collapsed.png) left .6em no-repeat; + margin-left: -12px; + padding-left: 12px; +} +#system-modules .expanded .expand .inner { + background: transparent url(../../misc/menu-expanded.png) left .6em no-repeat; +} +#system-modules label { + color: #1d1d1d; + font-size: 1.15em; +} +#system-modules .description { + cursor: pointer; +} +#system-modules .description .inner { + color: #5c5c5b; + height: 20px; + line-height: 20px; + overflow: hidden; /* truncates descriptions if too long */ + text-overflow: ellipsis; + white-space: nowrap; +} +#system-modules .expanded .description .inner { + height: auto; + overflow: visible; + white-space: normal; +} +#system-modules .expanded .description .text { + -webkit-hyphens: auto; + -moz-hyphens: auto; + hyphens: auto; +} + +@media screen and (max-width: 40em) { + #system-modules th.name { + width: 20%; + } + #system-modules th.description { + width: 40%; + } +} +#system-modules .requirements { + padding: 5px 0; + max-width: 490px; +} +#system-modules .links { + overflow: hidden; /* prevents collapse */ +} +#system-modules .checkbox { + margin: 0 5px; +} +#system-modules .checkbox .form-item { + margin-bottom: 0; +} div.admin-requirements, div.admin-required { font-size: 0.9em; - color: #444; + color: #666; } span.admin-disabled { color: #800; @@ -77,8 +144,10 @@ span.admin-missing { } a.module-link { display: block; - padding: 1px 0 1px 20px; /* LTR */ + padding: 2px 20px; white-space: nowrap; + margin-top: 2px; + float: left; /* LTR */ } a.module-link-help { background: url(../../misc/help.png) 0 50% no-repeat; /* LTR */ diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc index 25691bd692abf8fcb208a3f8e6f1c68b7abfc2d3..708854f8622aea2f1a891708c6bea2e35dea6332 100644 --- a/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -853,7 +853,7 @@ function system_modules($form, $form_state = array()) { $extra['disabled'] = TRUE; } elseif ($files[$requires]->status) { - $extra['requires'][$requires] = t('@module (enabled)', array('@module' => $requires_name)); + $extra['requires'][$requires] = t('@module', array('@module' => $requires_name)); } else { $extra['requires'][$requires] = t('@module (disabled)', array('@module' => $requires_name)); @@ -900,7 +900,7 @@ function system_modules($form, $form_state = array()) { // Hidden modules are unset already. if (isset($visible_files[$required_by])) { if ($files[$required_by]->status == 1 && $module->status == 1) { - $extra['required_by'][] = t('@module (enabled)', array('@module' => $files[$required_by]->info['name'])); + $extra['required_by'][] = t('@module', array('@module' => $files[$required_by]->info['name'])); $extra['disabled'] = TRUE; } else { @@ -919,11 +919,9 @@ function system_modules($form, $form_state = array()) { '#collapsible' => TRUE, '#theme' => 'system_modules_fieldset', '#header' => array( - array('data' => t('Enabled'), 'class' => array('checkbox')), - t('Name'), - array('data' => t('Version'), 'class' => array(RESPONSIVE_PRIORITY_MEDIUM)), - array('data' => t('Description'), 'class' => array(RESPONSIVE_PRIORITY_LOW)), - array('data' => t('Operations'), 'colspan' => 3), + array('data' => t('Enabled'), 'class' => array('checkbox')), + array('data' => t('Name'), 'class' => array('name')), + array('data' => t('Description'), 'class' => array('description', RESPONSIVE_PRIORITY_LOW)), ), // Ensure that the "Core" package fieldset comes first. '#weight' => $package == 'Core' ? -10 : NULL, @@ -933,6 +931,7 @@ function system_modules($form, $form_state = array()) { // Lastly, sort all fieldsets by title. uasort($form['modules'], 'element_sort_by_title'); + $form['#attached']['library'][] = array('system', 'drupal.system.modules'); $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', @@ -1021,6 +1020,7 @@ function _system_modules_build_row($info, $extra) { '#type' => 'checkbox', '#title' => t('Enable'), '#default_value' => $extra['enabled'], + '#attributes' => array('role' => 'disabled'), ); if ($extra['disabled']) { $form['enable']['#disabled'] = TRUE; @@ -2498,33 +2498,54 @@ function theme_system_modules_fieldset($variables) { // Individual table headers. $rows = array(); - // Iterate through all the modules, which are - // children of this fieldset. + // Iterate through all the modules, which are children of this fieldset. foreach (element_children($form) as $key) { - // Stick it into $module for easier accessing. + // Stick the key into $module for easier access. $module = $form[$key]; + // Create the row for the table. $row = array(); + // Add the checkbox into the first cell. unset($module['enable']['#title']); + $module['#requires'] = array_filter($module['#requires']); + $module['#required_by'] = array_filter($module['#required_by']); + + $requires = !empty($module['#requires']); + $required_by = !empty($module['#required_by']); + $version = !empty($module['version']['#markup']); + $row[] = array('class' => array('checkbox'), 'data' => drupal_render($module['enable'])); - $label = ''; - $row[] = drupal_render($module['version']); + + // Add the module label and expand/collapse functionalty. + $col2 = ''; + $row[] = array('class' => array('module'), 'data' => $col2); + // Add the description, along with any modules it requires. - $description = drupal_render($module['description']); - if ($module['#requires']) { - $description .= '