Similar to worflow content_moderation supports any kind of transition from a state A to B. While you can create such transition using the content_moderation_transistion table, there is no UI yet.

This should be easily maintained through a ui.

Needs are:
- Transitions are for a specific content type
- Support loops
- Read possible states out of the content_moderation_state table

Comments

eugenmayer’s picture

Version: » 6.x-1.0-beta6
Status: Needs work » Active
broon’s picture

StatusFileSize
new1.28 KB
new3.58 KB

Here is my most recent patch against 6.x-1.2 which includes

  • Drupal messages for revisioning information only shown for super admin
  • Spelling correction of the word 'rights' (several replacements)
  • Extended rights management for viewing moderation history
  • First draft of a simple UI for transition management (delete/create states/transitions)

Patch includes one new file content_moderation.admin.inc (gzipped due to upload restrictions) for UI.

Regards,
Paul

broon’s picture

One more note on the UI. It is possible to create AND delete states OR transitions in one step. Hence, there are two submit buttons, one working for states and one for transitions. This isn't really necessary as all actions could be processed in a single step and probably should (maybe will) be removed by next update.

broon’s picture

Version: 6.x-1.0-beta6 » 6.x-1.2
eugenmayer’s picture

This is outstanding!

Realy great work you created there. We have a little problem, thats that your patch includes like 4 features (which are all great), so harder to imlement. We will need to start a new branch for this.

Seeing that you put that much work into this, i would like to offer you a co-maintainership, so we can work more directly. Just let me know (you will need to apply for CVS maintainership, stating that you want to co-maintain module content_moderation. I will then need to confirm that.

I will publish this module on github, as iam not going to activly work on CVS in branches or similar. I hope you are able to use git.

Once again - thank you for the great addition and contribution!

broon’s picture

Thanks for the compliments.
I actually tried to keep the patch somewhat simple due to making implementation easier. The main changes (for UI) are in the additional file (except for the menu hook). All other changes are only within a few lines of content_moderation.module and mostly self-explaining (I hope). If you want to, I can divide the patch into four smaller ones.

As for CVS I'll check if I can get it running here since I already have SVN installed and don't want things to get messed up.

Regards,
Paul

eugenmayer’s picture

Title: UI for the transition management » UI for the transition and state management
broon’s picture

StatusFileSize
new453 bytes

Here's a patch for the admin UI only. You'll still need the additional file from comment #2, though.

azenned’s picture

Hi,
please change this :
$q = ' DELETE FROM {content_moderation_transition} WHERE from_name = "%s" AND from_name = "%s" ';
to
$q = ' DELETE FROM {content_moderation_transition} WHERE from_name = "%s" AND to_name = "%s" ';

broon’s picture

Thanks for pointing this out, zenned.
I already stumbled upon that, but the error remained in some working files.
Since I am currently reviewing most of the code (adding some spaces for readibility, correcting some spelling errors, ...) and rewriting the admin interface I will post a whole new patch either later tonight or tomorrow morning. This patch will separate states and transitions admin page as well as add another general settings page (currently only containing one more setting, feel free to add more).

Regards,
Paul

eugenmayer’s picture

Great approach, looking forward for the patch. Iam on holidays and thats why iam a bit limitted in helping you, but i hope i can review and help you starting the next week!

eugenmayer’s picture

Status: Active » Needs review
eugenmayer’s picture

if you like, http://github.com/EugenMayer/content_moderation its on github now. Fell free to start a push request and include the patch there :)

Start a new branch for that feature

eugenmayer’s picture

Status: Needs review » Closed (duplicate)