Skip to content
Snippets Groups Projects
Commit 630b2c06 authored by danielspeicher's avatar danielspeicher
Browse files

Merge remote-tracking branch 'origin/develop' into develop

parents a25ed8df 0861e3d8
No related branches found
No related tags found
1 merge request!82Merging develop into main
Pipeline #947913 passed
...@@ -84,7 +84,9 @@ ...@@ -84,7 +84,9 @@
}, },
"drupal/eca": { "drupal/eca": {
"#3352393 Condition list contains": "https://git.drupalcode.org/project/eca/-/merge_requests/349.diff", "#3352393 Condition list contains": "https://git.drupalcode.org/project/eca/-/merge_requests/349.diff",
"#3368530 eca_log tokens": "https://git.drupalcode.org/project/eca/-/merge_requests/370.diff" "#3368530 eca_log tokens": "https://git.drupalcode.org/project/eca/-/merge_requests/370.diff",
"#3373537 Plain token replacement": "https://git.drupalcode.org/project/eca/-/merge_requests/375.diff",
"#3351738 Views argument default plugin": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/eca_views_argument.patch"
}, },
"drupal/elasticsearch_connector": { "drupal/elasticsearch_connector": {
"#2952301 Flatten keys": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/develop/patches/elasticsearch_connector.patch" "#2952301 Flatten keys": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/develop/patches/elasticsearch_connector.patch"
...@@ -128,7 +130,7 @@ ...@@ -128,7 +130,7 @@
"#3355054 Default value for empty actions": "https://git.drupalcode.org/project/gin/-/merge_requests/246.diff" "#3355054 Default value for empty actions": "https://git.drupalcode.org/project/gin/-/merge_requests/246.diff"
}, },
"drupal/gin_toolbar": { "drupal/gin_toolbar": {
"#3319445 Permission check": "https://git.drupalcode.org/project/gin_toolbar/-/merge_requests/25.diff" "#3319445 Permission check": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/gin_toolbar-permissions.patch"
}, },
"drupal/glossify": { "drupal/glossify": {
"#3338553 PHP 8.1": "https://git.drupalcode.org/project/glossify/-/merge_requests/10.diff", "#3338553 PHP 8.1": "https://git.drupalcode.org/project/glossify/-/merge_requests/10.diff",
...@@ -164,6 +166,11 @@ ...@@ -164,6 +166,11 @@
"drupal/link_attributes": { "drupal/link_attributes": {
"#3050455 Array ri string conversion": "https://www.drupal.org/files/issues/2019-04-24/3050455-2.link_attributes.Array-to-string-conversion-in-DrupalCoreTemplateAttributeArraytoString.patch" "#3050455 Array ri string conversion": "https://www.drupal.org/files/issues/2019-04-24/3050455-2.link_attributes.Array-to-string-conversion-in-DrupalCoreTemplateAttributeArraytoString.patch"
}, },
"drupal/linkchecker": {
"#3375253 Alter request header": "https://git.drupalcode.org/project/linkchecker/-/merge_requests/47.diff",
"#3376854 Base path": "https://git.drupalcode.org/project/linkchecker/-/merge_requests/48.diff",
"#3313343 Disable cron": "https://www.drupal.org/files/issues/2022-10-03/support_disabling_cron-3313343-2.patch"
},
"drupal/linkit": { "drupal/linkit": {
"#3022261 Support anchors": "https://www.drupal.org/files/issues/2021-10-15/3022261_linkit_add-better-support-for-linking-to-anchors_22.patch" "#3022261 Support anchors": "https://www.drupal.org/files/issues/2021-10-15/3022261_linkit_add-better-support-for-linking-to-anchors_22.patch"
}, },
......
...@@ -85,7 +85,9 @@ ...@@ -85,7 +85,9 @@
}, },
"drupal/eca": { "drupal/eca": {
"#3352393 Condition list contains": "https://git.drupalcode.org/project/eca/-/merge_requests/349.diff", "#3352393 Condition list contains": "https://git.drupalcode.org/project/eca/-/merge_requests/349.diff",
"#3368530 eca_log tokens": "https://git.drupalcode.org/project/eca/-/merge_requests/370.diff" "#3368530 eca_log tokens": "https://git.drupalcode.org/project/eca/-/merge_requests/370.diff",
"#3373537 Plain token replacement": "https://git.drupalcode.org/project/eca/-/merge_requests/375.diff",
"#3351738 Views argument default plugin": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/eca_views_argument.patch"
}, },
"drupal/elasticsearch_connector": { "drupal/elasticsearch_connector": {
"#2952301 Flatten keys": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/develop/patches/elasticsearch_connector.patch" "#2952301 Flatten keys": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/develop/patches/elasticsearch_connector.patch"
...@@ -132,7 +134,7 @@ ...@@ -132,7 +134,7 @@
"#3355054 Default value for empty actions": "https://git.drupalcode.org/project/gin/-/merge_requests/246.diff" "#3355054 Default value for empty actions": "https://git.drupalcode.org/project/gin/-/merge_requests/246.diff"
}, },
"drupal/gin_toolbar": { "drupal/gin_toolbar": {
"#3319445 Permission check": "https://git.drupalcode.org/project/gin_toolbar/-/merge_requests/25.diff" "#3319445 Permission check": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/gin_toolbar-permissions.patch"
}, },
"drupal/glossify": { "drupal/glossify": {
"#3338553 PHP 8.1": "https://git.drupalcode.org/project/glossify/-/merge_requests/10.diff", "#3338553 PHP 8.1": "https://git.drupalcode.org/project/glossify/-/merge_requests/10.diff",
...@@ -168,6 +170,11 @@ ...@@ -168,6 +170,11 @@
"drupal/link_attributes": { "drupal/link_attributes": {
"#3050455 Array ri string conversion": "https://www.drupal.org/files/issues/2019-04-24/3050455-2.link_attributes.Array-to-string-conversion-in-DrupalCoreTemplateAttributeArraytoString.patch" "#3050455 Array ri string conversion": "https://www.drupal.org/files/issues/2019-04-24/3050455-2.link_attributes.Array-to-string-conversion-in-DrupalCoreTemplateAttributeArraytoString.patch"
}, },
"drupal/linkchecker": {
"#3375253 Alter request header": "https://git.drupalcode.org/project/linkchecker/-/merge_requests/47.diff",
"#3376854 Base path": "https://git.drupalcode.org/project/linkchecker/-/merge_requests/48.diff",
"#3313343 Disable cron": "https://www.drupal.org/files/issues/2022-10-03/support_disabling_cron-3313343-2.patch"
},
"drupal/linkit": { "drupal/linkit": {
"#3022261 Support anchors": "https://www.drupal.org/files/issues/2021-10-15/3022261_linkit_add-better-support-for-linking-to-anchors_22.patch" "#3022261 Support anchors": "https://www.drupal.org/files/issues/2021-10-15/3022261_linkit_add-better-support-for-linking-to-anchors_22.patch"
}, },
......
diff --git a/modules/views/src/Plugin/views/argument_default/Eca.php b/modules/views/src/Plugin/views/argument_default/Eca.php
new file mode 100644
index 0000000000000000000000000000000000000000..e390ac6cceb1821735270d257c8855e5f930fb5c
--- /dev/null
+++ b/modules/views/src/Plugin/views/argument_default/Eca.php
@@ -0,0 +1,19 @@
+<?php
+
+namespace Drupal\eca_views\Plugin\views\argument_default;
+
+use Drupal\views\Plugin\views\argument_default\ArgumentDefaultPluginBase;
+
+/**
+ * The ECA argument default handler.
+ *
+ * @ingroup views_argument_default_plugins
+ *
+ * @ViewsArgumentDefault(
+ * id = "eca",
+ * title = @Translation("ECA")
+ * )
+ */
+class Eca extends ArgumentDefaultPluginBase {
+
+}
diff --git a/gin_toolbar.module b/gin_toolbar.module
index 02bfce3568b53852a49092f0d6a6b3db89216a9d..1ced229a9910d12d0243ebd465f576e6c78361cf 100644
--- a/gin_toolbar.module
+++ b/gin_toolbar.module
@@ -8,6 +8,7 @@
use Drupal\Component\Utility\Html;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Routing\RouteMatchInterface;
+use Drupal\Core\Url;
use Drupal\gin_toolbar\Render\Element\GinToolbar;
use Drupal\gin\GinSettings;
use Drupal\gin\GinUserPicture;
@@ -194,8 +195,13 @@ function gin_toolbar_preprocess_toolbar(&$variables) {
$entity = \Drupal::request()->attributes->get($matches['entity_type_id']);
if ($entity instanceof EntityInterface && $entity->hasLinkTemplate('edit-form')) {
- $variables['entity_title'] = $entity->label();
- $variables['entity_edit_url'] = $entity->toUrl('edit-form');
+ if ($entity->access('update')) {
+ $variables['entity_title'] = $entity->label();
+ $variables['entity_edit_url'] = $entity->toUrl('edit-form');
+ }
+ elseif (Url::fromRoute('system.admin_content')->access(\Drupal::currentUser())) {
+ $variables['access_admin_content'] = TRUE;
+ }
}
}
}
diff --git a/templates/toolbar.html.twig b/templates/toolbar.html.twig
index e82bc1ceae19f14a3a7109a8d433e78dbf0d5ef3..5380e54f1899ef763f3036edef08f91e5b5d0a88 100644
--- a/templates/toolbar.html.twig
+++ b/templates/toolbar.html.twig
@@ -16,7 +16,7 @@
<li class="gin-breadcrumb__item">
{% if entity_edit_url and entity_title %}
<a class="gin-breadcrumb__link gin-back-to-admin" href="{{ entity_edit_url }}">{{ 'Edit %title'|t({ '%title': entity_title }) }}</a>
- {% else %}
+ {% elseif access_admin_content %}
<a class="gin-breadcrumb__link gin-back-to-admin" href="{{ path('system.admin_content') }}">{{ 'Back to Administration'|t }}</a>
{% endif %}
</li>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment