Some people have requested better intergration if you have an admin theme.

This is from #1083720: Incorporate Diff to Compare Revisions and comment #31.

@jwilson3 has created a patch for this in comment #50. workbench_moderation-diff-admin-theme-1083720-50.patch

Comments

jwilson3’s picture

This is the same patch from #1083720-50: Incorporate Diff to Compare Revisions, just re-uploaded with the matching issue number in the filename.

rocketeerbkw’s picture

Do we need to be specific about Diff module or can we just put all moderation pages under admin?

jwilson3’s picture

>can we just put all moderation pages under admin?

Makes sense to me. Thoughts @iStryker?

I'm curious, does the patch in #2 still show /node/X/moderation with the admin theme? In other words, ensuring that the /* wildcard does not only affects sub-pages of the moderation section.

apemantus’s picture

Status: Needs review » Reviewed & tested by the community

Patch in #2 has just saved me after an hour or two of trying to work out why node/X/moderation/diff/view/Y/Z wasn't working - ended up upgrading, debugging, clearing caches a number of times before realising my theme wasn't outputting the correct variables. Think workbench should follow diff and use the admin theme so yes, this would be good.

jwilson3’s picture

Yep, just ran into this again on a new project and #2 worked for me too!

RTBC++

hass’s picture

Status: Reviewed & tested by the community » Needs work

I do not think this will work all times. I thought the same some months ago, when we worked on diff 3.x, but it will cause a node preview in seven as example and will show later completly different under production. I have custom theming implemented for my none admin theme and if the node is previewd in seven it will be very broken. Therefore there are good reasons to load this paths not in admin theme.

hass’s picture

node/*/moderation/diff could be loaded in an overlay, but node/*/moderation/diff/view/* not. I'm not sure if the flickering (overlay/non-overlay) is good usability in this case.

Otherwise node/*/revisions/view/* is also loaded in an overlay and breaks all theming... this may comes from core or diff module. Need to look into first.

hass’s picture

With the #2 patch the diff preview does not show colored backgrounds anymore (at least in seven). If there is an added line it should normally become green, but this is overridden by style.css in seven. CSS from Diff module seems to loose here.

hass’s picture

I should not always run DEV versions without a timestamp. Has already been fixed in Diff. I'm finally not sure about the theming issue in Seven where the un-themed preview is just plain wrong.

jwilson3’s picture

So, where does this stand, after all that? still needs work, or was all that a false alarm?

hass’s picture

Not really. The node is not properly shown in admin theme.

hass’s picture

Title: Diff tab that intergrates with the moderation tab » Add missing admin paths
Category: feature » bug
Status: Needs work » Reviewed & tested by the community

I'm generalize this case now and moving it to a bug as I found a lot of module paths that require an overlay and are also missing in hook_admin_paths. Patch attached does follow core (revisions are shown in overlay). The nodes are not properly shown in admin theme, but if core does this we can follow here and I do not care about this - however wrong it seems to me - follow core. I replaced the generic 'node/*/moderation/*' rule with a more explicit approach like core node modules does. Node module specifies every path explicitly.

Patch attached has been tested with all these paths.

hass’s picture

Missed to attach the patch

jwilson3’s picture

RTBC++, but you really shouldn't RTBC your own patch.

stevector’s picture

Status: Reviewed & tested by the community » Fixed

Thanks everybody!

http://drupal.org/commitlog/commit/18554/61688bb277739c104e9335e4dbe7351...

Also yes, please avoid RTBC'ing your own patch.

hass’s picture

Please grant co-maintainer permission to me. So I can commit directly and we are not loosing track and sooooo much time. There are tons of need review patches in queue and the maintainers are not commiting/reviewing them. Thx.

jwilson3’s picture

hass, open up a separate issue to request co-maintainer access i think.

Status: Fixed » Closed (fixed)

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