The messages from Workbench Access and Workbench Moderation are useful, but intrusive and a misuse of the message system.

Instead we want a Workbench block that admins can place where they wish. The block should define a render array standard that other modules may add messages to.

-- workbench_block_view()
-- hook_workbench_block_view()
-- hook_workbench_block_view_alter()

In later iterations, we may need configure options as well.

Comments

agentrickard’s picture

Status: Active » Needs review
StatusFileSize
new5.98 KB

These hooks are already provided by core. I just documented them.

agentrickard’s picture

StatusFileSize
new1.81 KB

Wrong patch!

agentrickard’s picture

StatusFileSize
new2.37 KB

And a related patch to move the Workbench Access messages.

yoroy’s picture

Consider positioning and making it look similar to how the issue and handbook meta data for entries work here:

Only local images are allowed.

and

Only local images are allowed.

An important aspect of both these designs is that the info blocks are shown below the title, which makes it clear that this is info about that particular content item, not the "whole page".

agentrickard’s picture

Status: Needs review » Needs work

Nice. I like the second example a lot. I think we can do that by wrapping the block in a div and default placing it in the top of the 'content' area.

agentrickard’s picture

StatusFileSize
new27.96 KB

Like so?

agentrickard’s picture

Status: Needs work » Needs review
StatusFileSize
new2.18 KB
new2.56 KB

Proper patch for WB and WA.

yoroy’s picture

I would definately recommend to go ahead with this. Tweakage of how all the bits that go in there can still happen afterwards.

agentrickard’s picture

Status: Needs review » Reviewed & tested by the community

Ready for commit.

agentrickard’s picture

Project: Workbench » Workbench Moderation
Version: 7.x-1.x-dev » 7.x-1.0-beta5
Status: Reviewed & tested by the community » Active

@becw

This has been committed. Can you add / move the Workbench Moderation bits here, too?

brunodbo’s picture

Looks great. Only thing I'm wondering about is the actual text in the block. Eg. for certain site users, 'Workbench access: ...' might not mean much. But I guess since the whole text is run trough t(), site builders can put whatever they want there through the translation interface?

agentrickard’s picture

We used 'Editorial section' for a while, but @caroltron asked for it to be made explicitly 'Workbench access' during an earlier dev cycle.

brunodbo’s picture

I'm thinking that the needs for which text to put there may depend heavily on which site WB is used. Eg: on a news site it may be 'Editorial section', while on a collaborative blog it may be 'Blog'. Could we perhaps make it configurable/overrideable (maybe it is already)?

agentrickard’s picture

It could be a configuration option, sure. You care to open a new issue for that?

brunodbo’s picture

stevector’s picture

Status: Active » Closed (duplicate)

I think everything needed here can be covered in #1139568: Make Workbench Moderation messages configurable