Download & Extend

edit button when viewing a revision

Project:Content moderation
Version:6.x-1.9
Component:User interface
Category:task
Priority:normal
Assigned:Gold
Status:needs work

Issue Summary

[SparksInteractive] This is a task covered by the tile allotted to me by my employer. Discussion and patches are welcomed.

We'd want to show an edit button when viewing a revision, so that users who have the permission can easily start editing. Should do this in a way that can be committed back into the module, maybe with a checkbox on the settings page?

Comments

#1

The problem with this is, that the user will think, he is editing that revision. But that is not the case, as drupal does not allow this. Eventhough you _can_ try to load a revision and edit it, it would mean branching, but even that is not supported by drupal ( only serial revisions ). So you end up in a real mess.

#2

Hmm... Yep. I see the point here. I can see a few ways around that.

  1. Add a path that injects a drupal_set_message() informing the user about what they are actually editing.
  2. Document this aspect of it clearly and concisly so that any complaints about it can be responded to with RTFM. :)

Both ways can also be enhanced a little with the appropriate title on the anchor (that being "Edit latest revision").

The main point the boss has at the moment though, is that the number of clicks required to edit the node while viewing a revision. The edit link would only be added to the latest revision in the list also. Not all.

I'm about to start into this. I'll see what I can do and you can take a look, see what you think.

#3

D'Oh! heading back to the last one I worked on for a bit. Exploring that showed that the solution I had found (revisioning module) is likely to be serious overkill for the task. :/

#4

Status:active» needs review

Okay. Turns out to be a minor update.

If people could please test this patch that would be great.

Again, this, and my other patches are available through a checkout of https://github.com/Unifex/content_moderation

This patch _should_ add an edit icon to the the revision blocks. The edit icon should appear on every revision page but should only link to the node/%node/edit page. i.e. the latest revision. It should also only appear on the latest revision in the list too.

AttachmentSize
cm.patch 3.1 KB

#5

Status:needs review» needs work

Cool. Gold could you make this an option an the admin page, by default being hidden and we update the docu to make people know about that option?

To always edit the latest revision is a wise approach, anything else is the way down to hell with drupal :) Good work!

#6

Will see if I can slip this into the tasks coming up.

nobody click here