Hi

I think that this could be useful to somebody, currently the summary display of revisions (node/nid/revisions/list) is only "view", this patch adds a "operations" column at the end, with the edit link for the revision.

This is a stab patch, maybe delete and revert could be included as well, maybe with icons... what do you think?

Comments

rdeboer’s picture

Not a bad idea, Pedro!

I would prefer to check permissions before rendering an "Edit" link though.
Otherwise the user may get an "Access denied" when they click the link.
If they don't have permission to edit the file, ideally the link should not appear at all.

Rik

pcambra’s picture

Yeah, I though about that, but should then the operations column be hidden as well if there is no operation with permissions, right?

As far as I have understood, the permission for all this operations is only "edit revisions", would make sense to create additional permissions like delete or revert? would make sense to create one permission for each content type then?

pcambra’s picture

StatusFileSize
new6.25 KB
new3.08 KB

I'm attaching a new patch including Publish, Edit, Revert and Delete links.

I've called _revisioning_node_revision_access for checking if the user has permissions to execute the action prior to display the link, but I'm getting only the Edit action besides I'm superuser and I've the privileges to all these actions in the permisions page. Maybe this should be invoked via user_access instead?

Also I'm including a css folder with a css and one tango (GPL) image for each action.

Please, let me know what you think

rdeboer’s picture

Can be done now using the Module Grants View submodule (part of Module Grants package download). It allows you to add Edit and Delete links to your View that honour the permissions.

rdeboer’s picture

Status: Active » Closed (fixed)