diff --git a/core/modules/action/action.info b/core/modules/action/action.info index ddddd63..921577f 100644 --- a/core/modules/action/action.info +++ b/core/modules/action/action.info @@ -4,3 +4,6 @@ package = Core version = VERSION core = 8.x configure = admin/config/system/actions +tags[] = action +tags[] = api +tags[] = views/field diff --git a/core/modules/aggregator/aggregator.info b/core/modules/aggregator/aggregator.info index 66e1e51..6dab216 100644 --- a/core/modules/aggregator/aggregator.info +++ b/core/modules/aggregator/aggregator.info @@ -5,3 +5,5 @@ version = VERSION core = 8.x configure = admin/config/services/aggregator/settings dependencies[] = file +tags[] = block +tags[] = service diff --git a/core/modules/ban/ban.info b/core/modules/ban/ban.info index e23331c..a168d5a 100644 --- a/core/modules/ban/ban.info +++ b/core/modules/ban/ban.info @@ -4,3 +4,6 @@ package = Core version = VERSION core = 8.x configure = admin/config/people/ban +tags[] = admin +tags[] = security +tags[] = spam diff --git a/core/modules/block/block.info b/core/modules/block/block.info index e22e797..a10f9fe 100644 --- a/core/modules/block/block.info +++ b/core/modules/block/block.info @@ -4,3 +4,6 @@ package = Core version = VERSION core = 8.x configure = admin/structure/block +tags[] = api +tags[] = block +tags[] = layout diff --git a/core/modules/block/custom_block/custom_block.info b/core/modules/block/custom_block/custom_block.info index f38e540..54d6520 100644 --- a/core/modules/block/custom_block/custom_block.info +++ b/core/modules/block/custom_block/custom_block.info @@ -4,3 +4,6 @@ package = Core version = VERSION core = 8.x dependencies[] = block +tags[] = block +tags[] = content +tags[] = entity diff --git a/core/modules/book/book.info b/core/modules/book/book.info index d7fa3c9..c80d408 100644 --- a/core/modules/book/book.info +++ b/core/modules/book/book.info @@ -6,3 +6,6 @@ core = 8.x dependencies[] = menu_link dependencies[] = node configure = admin/content/book/settings +tags[] = block +tags[] = content +tags[] = structure diff --git a/core/modules/breakpoint/breakpoint.info b/core/modules/breakpoint/breakpoint.info index 793bdcd..4494238 100644 --- a/core/modules/breakpoint/breakpoint.info +++ b/core/modules/breakpoint/breakpoint.info @@ -3,4 +3,5 @@ description = Manage breakpoints and breakpoint groups for responsive designs. package = Core version = VERSION core = 8.x - +tags[] = layout +tags[] = theme diff --git a/core/modules/ckeditor/ckeditor.info b/core/modules/ckeditor/ckeditor.info index 9c40ac2..2d75f9b 100644 --- a/core/modules/ckeditor/ckeditor.info +++ b/core/modules/ckeditor/ckeditor.info @@ -4,3 +4,5 @@ package = Core core = 8.x version = VERSION dependencies[] = editor +tags[] = admin +tags[] = ux diff --git a/core/modules/color/color.info b/core/modules/color/color.info index 6d2c9f9..960ca0f 100644 --- a/core/modules/color/color.info +++ b/core/modules/color/color.info @@ -3,3 +3,4 @@ description = Allows administrators to change the color scheme of compatible the package = Core version = VERSION core = 8.x +tags[] = theme diff --git a/core/modules/comment/comment.info b/core/modules/comment/comment.info index 78394e9..bce7b9a 100644 --- a/core/modules/comment/comment.info +++ b/core/modules/comment/comment.info @@ -7,3 +7,6 @@ dependencies[] = node dependencies[] = datetime dependencies[] = text configure = admin/content/comment +tags[] = block +tags[] = entity +tags[] = content diff --git a/core/modules/config/config.info b/core/modules/config/config.info index efab7a1..9a82cc3 100644 --- a/core/modules/config/config.info +++ b/core/modules/config/config.info @@ -4,3 +4,4 @@ package = Core version = VERSION core = 8.x configure = admin/config/development/sync +tags[] = api/ui diff --git a/core/modules/contact/contact.info b/core/modules/contact/contact.info index eff6d33..7e661a5 100644 --- a/core/modules/contact/contact.info +++ b/core/modules/contact/contact.info @@ -4,3 +4,5 @@ package = Core version = VERSION core = 8.x configure = admin/structure/contact +tags[] = entity +tags[] = mail diff --git a/core/modules/contextual/contextual.info b/core/modules/contextual/contextual.info index 8a99dea..d0a26f1 100644 --- a/core/modules/contextual/contextual.info +++ b/core/modules/contextual/contextual.info @@ -3,3 +3,4 @@ description = Provides contextual links to perform actions related to elements o package = Core version = VERSION core = 8.x +tags[] = ux diff --git a/core/modules/datetime/datetime.info b/core/modules/datetime/datetime.info index f1bb32c..6f8b917 100644 --- a/core/modules/datetime/datetime.info +++ b/core/modules/datetime/datetime.info @@ -4,3 +4,4 @@ package = Core version = VERSION core = 8.x dependencies[] = field +tags[] = field/type diff --git a/core/modules/dblog/dblog.info b/core/modules/dblog/dblog.info index fd18bb3..d84d0de 100644 --- a/core/modules/dblog/dblog.info +++ b/core/modules/dblog/dblog.info @@ -3,3 +3,4 @@ description = Logs and records system events to the database. package = Core version = VERSION core = 8.x +tags[] = admin diff --git a/core/modules/edit/edit.info b/core/modules/edit/edit.info index 7c6d4b9..ee20390 100644 --- a/core/modules/edit/edit.info +++ b/core/modules/edit/edit.info @@ -5,3 +5,5 @@ core = 8.x version = VERSION dependencies[] = contextual dependencies[] = field +tags[] = admin +tags[] = ux diff --git a/core/modules/editor/editor.info b/core/modules/editor/editor.info index 995d003..65e1c09 100644 --- a/core/modules/editor/editor.info +++ b/core/modules/editor/editor.info @@ -3,5 +3,7 @@ description = "Allows to associate text formats with text editor libraries such package = Core version = VERSION core = 8.x -dependencies[] = filter configure = admin/config/content/formats +dependencies[] = filter +tags[] = admin +tags[] = ux diff --git a/core/modules/email/email.info b/core/modules/email/email.info index c5b7437..4156d6c 100644 --- a/core/modules/email/email.info +++ b/core/modules/email/email.info @@ -4,3 +4,4 @@ package = Core version = VERSION core = 8.x dependencies[] = field +tags[] = field/type diff --git a/core/modules/entity/entity.info b/core/modules/entity/entity.info index 5887b39..a7a92e5 100644 --- a/core/modules/entity/entity.info +++ b/core/modules/entity/entity.info @@ -4,3 +4,4 @@ package = Core version = VERSION core = 8.x required = TRUE +tags[] = api diff --git a/core/modules/entity_reference/entity_reference.info b/core/modules/entity_reference/entity_reference.info index 2216092..a761f88 100644 --- a/core/modules/entity_reference/entity_reference.info +++ b/core/modules/entity_reference/entity_reference.info @@ -4,3 +4,4 @@ package = Core version = VERSION core = 8.x dependencies[] = field +tags[] = field/type diff --git a/core/modules/field/field.info b/core/modules/field/field.info index c74da0e..e129c12 100644 --- a/core/modules/field/field.info +++ b/core/modules/field/field.info @@ -5,3 +5,5 @@ version = VERSION core = 8.x dependencies[] = field_sql_storage required = TRUE +tags[] = api +tags[] = field diff --git a/core/modules/field_sql_storage/field_sql_storage.info b/core/modules/field_sql_storage/field_sql_storage.info index 2106ac7..28110f7 100644 --- a/core/modules/field_sql_storage/field_sql_storage.info +++ b/core/modules/field_sql_storage/field_sql_storage.info @@ -5,3 +5,4 @@ version = VERSION core = 8.x dependencies[] = field required = TRUE +tags[] = field/storage diff --git a/core/modules/field_ui/field_ui.info b/core/modules/field_ui/field_ui.info index 2c3c27a..cc41bdc 100644 --- a/core/modules/field_ui/field_ui.info +++ b/core/modules/field_ui/field_ui.info @@ -4,3 +4,6 @@ package = Core version = VERSION core = 8.x dependencies[] = field +tags[] = api/ui +tags[] = entity +tags[] = field diff --git a/core/modules/file/file.info b/core/modules/file/file.info index dc93ab0..2058ea8 100644 --- a/core/modules/file/file.info +++ b/core/modules/file/file.info @@ -4,3 +4,6 @@ package = Core version = VERSION core = 8.x dependencies[] = field +tags[] = entity +tags[] = field/type +tags[] = media diff --git a/core/modules/filter/filter.info b/core/modules/filter/filter.info index 03ed179..bc83718 100644 --- a/core/modules/filter/filter.info +++ b/core/modules/filter/filter.info @@ -5,3 +5,5 @@ version = VERSION core = 8.x required = TRUE configure = admin/config/content/formats +tags[] = api +tags[] = filter diff --git a/core/modules/forum/forum.info b/core/modules/forum/forum.info index 79317ea..aea6c38 100644 --- a/core/modules/forum/forum.info +++ b/core/modules/forum/forum.info @@ -8,3 +8,5 @@ package = Core version = VERSION core = 8.x configure = admin/structure/forum +tags[] = block +tags[] = content diff --git a/core/modules/help/help.info b/core/modules/help/help.info index 615a302..c4c1e32 100644 --- a/core/modules/help/help.info +++ b/core/modules/help/help.info @@ -3,3 +3,5 @@ description = Manages the display of online help. package = Core version = VERSION core = 8.x +tags[] = api +tags[] = block diff --git a/core/modules/history/history.info b/core/modules/history/history.info index 7658749..e20b7e1 100644 --- a/core/modules/history/history.info +++ b/core/modules/history/history.info @@ -4,3 +4,4 @@ package = Core version = VERSION core = 8.x dependencies[] = node +tags[] = content diff --git a/core/modules/image/image.info b/core/modules/image/image.info index a63fbf5..16c0878 100644 --- a/core/modules/image/image.info +++ b/core/modules/image/image.info @@ -5,3 +5,5 @@ version = VERSION core = 8.x dependencies[] = file configure = admin/config/media/image-styles +tags[] = field/type +tags[] = media diff --git a/core/modules/jsonld/jsonld.info b/core/modules/jsonld/jsonld.info index 6e89779..454867b 100644 --- a/core/modules/jsonld/jsonld.info +++ b/core/modules/jsonld/jsonld.info @@ -5,3 +5,4 @@ version = VERSION core = 8.x dependencies[] = rdf dependencies[] = serialization +tags[] = service diff --git a/core/modules/language/language.info b/core/modules/language/language.info index 53ab979..d46e56e 100644 --- a/core/modules/language/language.info +++ b/core/modules/language/language.info @@ -4,3 +4,5 @@ package = Multilingual version = VERSION core = 8.x configure = admin/config/regional/language +tags[] = block +tags[] = language diff --git a/core/modules/layout/layout.info b/core/modules/layout/layout.info index 187bfea..1db674a 100644 --- a/core/modules/layout/layout.info +++ b/core/modules/layout/layout.info @@ -3,3 +3,4 @@ description = Makes it possible to swap different page layouts. package = Core version = VERSION core = 8.x +tags[] = layout diff --git a/core/modules/link/link.info b/core/modules/link/link.info index a43c222..5f93658 100644 --- a/core/modules/link/link.info +++ b/core/modules/link/link.info @@ -4,3 +4,4 @@ core = 8.x package = Core version = VERSION dependencies[] = field +tags[] = field/type diff --git a/core/modules/locale/locale.info b/core/modules/locale/locale.info index bb9c0e3..3aa8dc8 100644 --- a/core/modules/locale/locale.info +++ b/core/modules/locale/locale.info @@ -6,3 +6,4 @@ core = 8.x configure = admin/config/regional/translate dependencies[] = language dependencies[] = file +tags[] = language diff --git a/core/modules/menu/menu.info b/core/modules/menu/menu.info index 7aad518..3508ad9 100644 --- a/core/modules/menu/menu.info +++ b/core/modules/menu/menu.info @@ -5,3 +5,6 @@ version = VERSION core = 8.x dependencies[] = menu_link configure = admin/structure/menu +tags[] = block +tags[] = content +tags[] = structure diff --git a/core/modules/menu_link/menu_link.info b/core/modules/menu_link/menu_link.info index 71e0d8c..ea80b96 100644 --- a/core/modules/menu_link/menu_link.info +++ b/core/modules/menu_link/menu_link.info @@ -6,3 +6,5 @@ core = 8.x ; @todo Menu links functionality has been moved from system.module and menu.inc ; to this module, so make it required until everything is moved over. required = TRUE +tags[] = entity +tags[] = structure diff --git a/core/modules/node/node.info b/core/modules/node/node.info index e8413a2..4002562 100644 --- a/core/modules/node/node.info +++ b/core/modules/node/node.info @@ -5,3 +5,7 @@ version = VERSION core = 8.x dependencies[] = datetime configure = admin/structure/types +tags[] = api +tags[] = block +tags[] = entity +tags[] = content diff --git a/core/modules/number/number.info b/core/modules/number/number.info index aabe3d7..6a185c7 100644 --- a/core/modules/number/number.info +++ b/core/modules/number/number.info @@ -4,3 +4,4 @@ package = Core version = VERSION core = 8.x dependencies[] = field +tags[] = field/type diff --git a/core/modules/openid/openid.info b/core/modules/openid/openid.info index fd7359a..f296d6f 100644 --- a/core/modules/openid/openid.info +++ b/core/modules/openid/openid.info @@ -3,3 +3,4 @@ description = "Allows users to log into your site using OpenID." version = VERSION package = Core core = 8.x +tags[] = service diff --git a/core/modules/options/options.info b/core/modules/options/options.info index f19e952..a05168c 100644 --- a/core/modules/options/options.info +++ b/core/modules/options/options.info @@ -4,3 +4,6 @@ package = Core version = VERSION core = 8.x dependencies[] = field +tags[] = field/type +; Ex Options widgets...? +tags[] = field/widget diff --git a/core/modules/overlay/overlay.info b/core/modules/overlay/overlay.info index a782792..34c2d64 100644 --- a/core/modules/overlay/overlay.info +++ b/core/modules/overlay/overlay.info @@ -3,3 +3,4 @@ description = Displays the Drupal administration interface in an overlay. package = Core version = VERSION core = 8.x +tags[] = ux diff --git a/core/modules/path/path.info b/core/modules/path/path.info index 7323d1b..20bf848 100644 --- a/core/modules/path/path.info +++ b/core/modules/path/path.info @@ -4,3 +4,5 @@ package = Core version = VERSION core = 8.x configure = admin/config/search/path +tags[] = content +tags[] = structure diff --git a/core/modules/php/php.info b/core/modules/php/php.info index f155609..d8c2254 100644 --- a/core/modules/php/php.info +++ b/core/modules/php/php.info @@ -3,3 +3,4 @@ description = Allows embedded PHP code/snippets to be evaluated. package = Core version = VERSION core = 8.x +tags[] = filter diff --git a/core/modules/picture/picture.info b/core/modules/picture/picture.info index 47649d5..de8ad00 100644 --- a/core/modules/picture/picture.info +++ b/core/modules/picture/picture.info @@ -6,3 +6,5 @@ core = 8.x dependencies[] = breakpoint dependencies[] = image configure = admin/config/media/picturemapping +tags[] = field/formatter +tags[] = theme diff --git a/core/modules/rdf/rdf.info b/core/modules/rdf/rdf.info index bc975de..ec485b4 100644 --- a/core/modules/rdf/rdf.info +++ b/core/modules/rdf/rdf.info @@ -3,3 +3,4 @@ description = Enriches your content with metadata to let other applications (e.g package = Core version = VERSION core = 8.x +tags[] = service diff --git a/core/modules/rest/rest.info b/core/modules/rest/rest.info index c450567..e80c80c 100644 --- a/core/modules/rest/rest.info +++ b/core/modules/rest/rest.info @@ -7,3 +7,4 @@ core = 8.x dependencies[] = jsonld dependencies[] = serialization configure = admin/config/services/rest +tags[] = service diff --git a/core/modules/search/search.info b/core/modules/search/search.info index 768b861..84bcdb7 100644 --- a/core/modules/search/search.info +++ b/core/modules/search/search.info @@ -4,3 +4,5 @@ package = Core version = VERSION core = 8.x configure = admin/config/search/settings +tags[] = block +tags[] = content diff --git a/core/modules/serialization/serialization.info b/core/modules/serialization/serialization.info index 9ae7649..642dc3b 100644 --- a/core/modules/serialization/serialization.info +++ b/core/modules/serialization/serialization.info @@ -2,3 +2,4 @@ name = Serialization description = Provides a service for (de)serializing data to/from formats such as JSON and XML package = Core core = 8.x +tags[] = service diff --git a/core/modules/shortcut/shortcut.info b/core/modules/shortcut/shortcut.info index 97f25c6..c6ae8ed 100644 --- a/core/modules/shortcut/shortcut.info +++ b/core/modules/shortcut/shortcut.info @@ -5,3 +5,5 @@ version = VERSION core = 8.x dependencies[] = menu_link configure = admin/config/user-interface/shortcut +tags[] = admin +tags[] = ux diff --git a/core/modules/simpletest/simpletest.info b/core/modules/simpletest/simpletest.info index 6e18c42..94c81b6 100644 --- a/core/modules/simpletest/simpletest.info +++ b/core/modules/simpletest/simpletest.info @@ -4,4 +4,4 @@ package = Core version = VERSION core = 8.x configure = admin/config/development/testing/settings - +tags[] = dev diff --git a/core/modules/statistics/statistics.info b/core/modules/statistics/statistics.info index 6c1b76d..75ec35d 100644 --- a/core/modules/statistics/statistics.info +++ b/core/modules/statistics/statistics.info @@ -4,3 +4,4 @@ package = Core version = VERSION core = 8.x configure = admin/config/system/statistics +tags[] = admin diff --git a/core/modules/syslog/syslog.info b/core/modules/syslog/syslog.info index e3f541f..e29f844 100644 --- a/core/modules/syslog/syslog.info +++ b/core/modules/syslog/syslog.info @@ -3,3 +3,4 @@ description = Logs and records system events to syslog. package = Core version = VERSION core = 8.x +tags[] = admin diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc index b483e7e..a6edc90 100644 --- a/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -835,6 +835,65 @@ function system_modules($form, $form_state = array()) { ), ); + $form['filters']['tag'] = array( + '#type' => 'select', + '#title' => t('Filter by tag'), + '#empty_option' => t('- Select -'), + '#options' => array(), + '#id' => 'system-filter-tag', + ); + // Process all tags. + $all_tags = array(); + foreach ($visible_files as $filename => $module) { + $module_tags = array(); + // Tag untagged modules. + if (empty($module->info['tags'])) { + $module->info['tags'][] = '-'; + } + // Process tags. + foreach ($module->info['tags'] as $tag) { + // Prepare specified tag name. + // @todo Simple Porter-Stemmer to help prevent duplicates. + $tag = drupal_strtolower($tag); + $tag = strtr($tag, ',', ''); + + // Track the tag globally and (re)set it for the module. + $all_tags[$tag][$filename] = $filename; + $module_tags[$tag] = $tag; + + // If the tag is namespaced, additionally record the parent tag. + if ($pos = strpos($tag, '/')) { + $parent_tag = substr($tag, 0, $pos); + $all_tags[$parent_tag][$filename] = $filename; + $module_tags[$parent_tag] = $parent_tag; + } + } + // Replace tags in info with processed tags. + $module->info['tags'] = $module_tags; + } + // Remove tags that only appear once. + foreach ($all_tags as $tag => $modules) { + if (count($modules) < 2) { + foreach ($modules as $filename => $module) { + unset($visible_files[$filename]->info['tags'][$tag]); + // If this removal leaves the module untagged, tag it accordingly. + if (empty($visible_files[$filename]->info['tags'])) { + $visible_files[$filename]->info['tags']['-'] = '-'; + } + } + unset($all_tags[$tag]); + } + } + // Populate the tag filter select options. + // Sort tags alphabetically and move the option for untagged modules last. + ksort($all_tags); + $options = drupal_map_assoc(array_keys($all_tags)); + if (isset($options['-'])) { + unset($options['-']); + $options['-'] = t('- Other -'); + } + $form['filters']['tag']['#options'] = $options; + $modules = array(); $form['modules'] = array('#tree' => TRUE); @@ -935,27 +994,18 @@ function system_modules($form, $form_state = array()) { } } } - $form['modules'][$module->info['package']][$filename] = _system_modules_build_row($module->info, $extra); + $form['modules'][$filename] = _system_modules_build_row($module->info, $extra); } // Add basic information to the details. - foreach (element_children($form['modules']) as $package) { - $form['modules'][$package] += array( - '#type' => 'details', - '#title' => t($package), - '#theme' => 'system_modules_details', - '#header' => array( - 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 comes first. - '#weight' => $package == 'Core' ? -10 : NULL, - ); - } - - // Lastly, sort all packages by title. - uasort($form['modules'], 'element_sort_by_title'); + $form['modules'] += array( + '#theme' => 'system_modules_details', + '#header' => array( + array('data' => t('Enabled'), 'class' => array('checkbox')), + array('data' => t('Name'), 'class' => array('name')), + array('data' => t('Description'), 'class' => array('description', RESPONSIVE_PRIORITY_LOW)), + ), + ); $form['#attached']['library'][] = array('system', 'drupal.system.modules'); $form['actions'] = array('#type' => 'actions'); @@ -1015,6 +1065,16 @@ function _system_modules_build_row($info, $extra) { ); $form['#requires'] = $extra['requires']; $form['#required_by'] = $extra['required_by']; + $form['#tags'] = $info['tags']; + + // Module row attributes. + $form['#attributes'] = array(); + + // Add data-tags HTML attribute. + // Unconditionally add the attribute even if it is empty, so the front-end can + // target all elements that need to be filtered more easily. + // Prefix and suffix with delimiter to simplify tag matching in front-end. + $form['#attributes']['data-tags'] = ',' . implode(',', $info['tags']) . ','; // Check the compatibilities. $compatible = TRUE; @@ -2379,6 +2439,7 @@ function theme_system_modules_details($variables) { $requires = !empty($module['#requires']); $required_by = !empty($module['#required_by']); $version = !empty($module['version']['#markup']); + $tags = !empty($module['#tags']); $row[] = array('class' => array('checkbox'), 'data' => drupal_render($module['enable'])); @@ -2388,7 +2449,7 @@ function theme_system_modules_details($variables) { // Add the description, along with any modules it requires. $description = '' . drupal_render($module['description']) . ''; - if ($version || $requires || $required_by) { + if ($version || $requires || $required_by || $tags) { $description .= '