When editing the participants of a page it may be better to use the admin theme, or at least this is what I expected. Other tabs like "translate", "revision" all use the admin theme.

Patch following.

Comments

idflood created an issue. See original summary.

idflood’s picture

Status: Active » Needs review
StatusFileSize
new673 bytes

Status: Needs review » Needs work

The last submitted patch, 2: admin_theme_for_participants-2996887-2.patch, failed testing. View results

jhedstrom’s picture

Good idea!

+++ b/src/Entity/Routing/RouteProvider.php
@@ -73,6 +73,7 @@ class RouteProvider implements EntityRouteProviderInterface, EntityHandlerInterf
+        ->setOption('_admin_route', TRUE)

For node entity routes, this should instead set _node_operation_route to TRUE so that the page will use the admin route only if the site has node.settings.use_admin_theme set to TRUE.

idflood’s picture

Status: Needs work » Needs review
StatusFileSize
new682 bytes

Good catch, here is the updated patch.

das.gautam’s picture

Status: Needs review » Reviewed & tested by the community

Applying the patch allows to open "node/%/workflow-participants" pages using admin theme.
Marking it as RTBC.

jhedstrom’s picture

Status: Reviewed & tested by the community » Needs review

I was thinking something more like this:

      if ($entity_type->id() === 'node') {
        $route->setOption('_node_operation_route', TRUE);
      }
      else {
        $route->setOption('_admin_route', TRUE);
      }

That way non-node entity types get the admin theme too.

idflood’s picture

StatusFileSize
new766 bytes

Thanks for the suggestion, I forgot that workflow could be used on non-node things. Here is a new patch.

  • jhedstrom committed b31113c on 8.x-2.x authored by idflood
    Issue #2996887 by idflood: Use admin theme for the node workflow-...
jhedstrom’s picture

Status: Needs review » Fixed

Awesome, thanks for this!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.