Skip to content
Snippets Groups Projects
Commit c4d2b3b9 authored by Michael Lee's avatar Michael Lee
Browse files

Merge branch 'admin_toolbar' into lee5151

parents 6422ebdd 5c7b387f
No related branches found
No related tags found
No related merge requests found
Showing with 52 additions and 34 deletions
......@@ -1685,17 +1685,17 @@
},
{
"name": "drupal/admin_toolbar",
"version": "3.4.0",
"version": "3.4.1",
"source": {
"type": "git",
"url": "https://git.drupalcode.org/project/admin_toolbar.git",
"reference": "3.4.0"
"reference": "3.4.1"
},
"dist": {
"type": "zip",
"url": "https://ftp.drupal.org/files/projects/admin_toolbar-3.4.0.zip",
"reference": "3.4.0",
"shasum": "2dc9bf50350693827b446180c9d61feebacc4b7a"
"url": "https://ftp.drupal.org/files/projects/admin_toolbar-3.4.1.zip",
"reference": "3.4.1",
"shasum": "bcb15ab40016becdb3ac8f21d7d1a721f48f3577"
},
"require": {
"drupal/core": "^9.2 || ^10"
......@@ -1706,8 +1706,8 @@
"type": "drupal-module",
"extra": {
"drupal": {
"version": "3.4.0",
"datestamp": "1683730547",
"version": "3.4.1",
"datestamp": "1684944156",
"security-coverage": {
"status": "covered",
"message": "Covered by Drupal's security advisory policy"
......
......@@ -1745,18 +1745,18 @@
},
{
"name": "drupal/admin_toolbar",
"version": "3.4.0",
"version_normalized": "3.4.0.0",
"version": "3.4.1",
"version_normalized": "3.4.1.0",
"source": {
"type": "git",
"url": "https://git.drupalcode.org/project/admin_toolbar.git",
"reference": "3.4.0"
"reference": "3.4.1"
},
"dist": {
"type": "zip",
"url": "https://ftp.drupal.org/files/projects/admin_toolbar-3.4.0.zip",
"reference": "3.4.0",
"shasum": "2dc9bf50350693827b446180c9d61feebacc4b7a"
"url": "https://ftp.drupal.org/files/projects/admin_toolbar-3.4.1.zip",
"reference": "3.4.1",
"shasum": "bcb15ab40016becdb3ac8f21d7d1a721f48f3577"
},
"require": {
"drupal/core": "^9.2 || ^10"
......@@ -1767,8 +1767,8 @@
"type": "drupal-module",
"extra": {
"drupal": {
"version": "3.4.0",
"datestamp": "1683730547",
"version": "3.4.1",
"datestamp": "1684944156",
"security-coverage": {
"status": "covered",
"message": "Covered by Drupal's security advisory policy"
......
......@@ -278,9 +278,9 @@
'dev_requirement' => false,
),
'drupal/admin_toolbar' => array(
'pretty_version' => '3.4.0',
'version' => '3.4.0.0',
'reference' => '3.4.0',
'pretty_version' => '3.4.1',
'version' => '3.4.1.0',
'reference' => '3.4.1',
'type' => 'drupal-module',
'install_path' => __DIR__ . '/../../web/modules/admin_toolbar',
'aliases' => array(),
......
......@@ -7,7 +7,7 @@ core_version_requirement: ^9.2 || ^10
dependencies:
- drupal:toolbar
# Information added by Drupal.org packaging script on 2023-05-10
version: '3.4.0'
# Information added by Drupal.org packaging script on 2023-05-24
version: '3.4.1'
project: 'admin_toolbar'
datestamp: 1683730338
datestamp: 1684944158
......@@ -6,7 +6,7 @@ core_version_requirement: ^9.2 || ^10
dependencies:
- admin_toolbar:admin_toolbar
# Information added by Drupal.org packaging script on 2023-05-10
version: '3.4.0'
# Information added by Drupal.org packaging script on 2023-05-24
version: '3.4.1'
project: 'admin_toolbar'
datestamp: 1683730338
datestamp: 1684944158
......@@ -7,7 +7,7 @@ configure: admin_toolbar_search.settings
dependencies:
- admin_toolbar:admin_toolbar_tools
# Information added by Drupal.org packaging script on 2023-05-10
version: '3.4.0'
# Information added by Drupal.org packaging script on 2023-05-24
version: '3.4.1'
project: 'admin_toolbar'
datestamp: 1683730338
datestamp: 1684944158
......@@ -66,6 +66,20 @@
margin: 0;
}
.admin-toolbar-search-autocomplete-list .ui-menu-item .ui-menu-item-wrapper {
border: 1px solid transparent;
padding: 3px 1em 3px 0.4em;
}
.admin-toolbar-search-autocomplete-list .ui-menu-item a {
text-decoration: none;
}
.admin-toolbar-search-autocomplete-list .ui-menu-item .ui-state-active:hover a,
.admin-toolbar-search-autocomplete-list .ui-menu-item .ui-state-active a {
color: white;
}
#toolbar-item-administration-search-tray label {
display: inline-block;
color: #000000;
......
......@@ -120,7 +120,7 @@ public function getLinks() {
$content_entity = $entities['content_entity'];
// Load the remaining items that were not loaded by the toolbar.
$content_entity_bundle_storage = $this->entityTypeManager->getStorage($content_entity_bundle);
$bundles_ids = $content_entity_bundle_storage->getQuery()->range($max_bundle_number)->execute();
$bundles_ids = $content_entity_bundle_storage->getQuery()->sort('weight')->range($max_bundle_number)->execute();
if (!empty($bundles_ids)) {
$bundles = $this->entityTypeManager
->getStorage($content_entity_bundle)
......
......@@ -7,7 +7,7 @@ core_version_requirement: ^9.2 || ^10
dependencies:
- admin_toolbar:admin_toolbar
# Information added by Drupal.org packaging script on 2023-05-10
version: '3.4.0'
# Information added by Drupal.org packaging script on 2023-05-24
version: '3.4.1'
project: 'admin_toolbar'
datestamp: 1683730338
datestamp: 1684944158
......@@ -111,14 +111,14 @@ public function getDerivativeDefinitions($base_plugin_definition) {
$content_entity_bundle = $entities['content_entity_bundle'];
$content_entity = $entities['content_entity'];
$content_entity_bundle_storage = $this->entityTypeManager->getStorage($content_entity_bundle);
$bundles_ids = $content_entity_bundle_storage->getQuery()->range(0, $max_bundle_number)->execute();
$bundles_ids = $content_entity_bundle_storage->getQuery()->sort('weight')->pager($max_bundle_number)->execute();
$bundles = $this->entityTypeManager->getStorage($content_entity_bundle)->loadMultiple($bundles_ids);
if (count($bundles) == $max_bundle_number && $this->routeExists('entity.' . $content_entity_bundle . '.collection')) {
$links[$content_entity_bundle . '.collection'] = [
'title' => $this->t('All types'),
'route_name' => 'entity.' . $content_entity_bundle . '.collection',
'parent' => 'entity.' . $content_entity_bundle . '.collection',
'weight' => -1,
'weight' => -999,
] + $base_plugin_definition;
}
foreach ($bundles as $machine_name => $bundle) {
......@@ -138,6 +138,10 @@ public function getDerivativeDefinitions($base_plugin_definition) {
'entity_id' => $bundle->id(),
],
] + $base_plugin_definition;
$weight = $bundles[$machine_name]->get('weight');
if (isset($weight) && is_numeric($weight)) {
$links[$content_entity_bundle_root]['weight'] = $weight;
}
}
if ($this->routeExists('entity.' . $content_entity_bundle . '.edit_form')) {
$key = 'entity.' . $content_entity_bundle . '.edit_form.' . $machine_name;
......@@ -354,7 +358,7 @@ public function getDerivativeDefinitions($base_plugin_definition) {
'title' => $this->t('Add vocabulary'),
'route_name' => 'entity.taxonomy_vocabulary.add_form',
'parent' => 'entity.taxonomy_vocabulary.collection',
'weight' => -5,
'weight' => -998,
] + $base_plugin_definition;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment