The patch applied and the views.zip extracted to the module folder should provide several handlers and definitions to integrate with views.

CommentFileSizeAuthor
#12 content_lock-views.patch404 bytesbrunodbo
views.zip2.42 KBfranz
content_lock-views.patch383 bytesfranz

Comments

eugenmayer’s picture

Hi Franz,

just to get the idea, what do we need the views integratio for? Kind of "show all locked nodes?".

Thanks

franz’s picture

Yes... I'm working on a project where there should be an interface for managing several nodes still in the workflow (not published), and the nodes list must show which ones are locked or not, and who's editing each project.

franz’s picture

It's a project where there are many people editing nodes all at the same time...

franz’s picture

BTW, I'll be doing a lot of testing in the next months, so if you feel like, you can give me CVS access to take this part on my responsability.

eugenmayer’s picture

Hi Franz, i will have a look a the patches and we can talk about co-maintaining that feature just after it.

greetings

Eugen

khad’s picture

hi franz,
this is exactly what I would need, so I already tried your patch. Gave me a "Parse error: syntax error, unexpected ')' in /var/www/drupal/sites/all/modules/content_lock/content_lock.module on line 606" initially, so I removed the mismatching ')', but then I could not see anything exposed to views - are your additions meant to do something visible already, or are they preparations for a views integration still to come?

franz’s picture

Status: Needs review » Needs work

Yes, the patch has a mismatched parenthesis, sorry.

Anyway, removing it and clearing the caches should be enough for some new handlers to be exposed on views UI. Did you properly unzipped the views folder inside the module folder?

khad’s picture

Sorry, just my stupidity - I didn't realize that I had to clear the cache to see it.
Seems to work flawlessly now, thanks a lot!

I just couldn't figure out how to show who is locking a node, is this already possible?

Just a cosmetic wish: I would prefer the 'is locked' field to display like a node's 'has new content' field - just the word 'locked' in red, or nothing at all. Can this be achieved somehow? (tried to do this with 'rewrite output', but couldn't get the desired result...)

khad’s picture

Sorry again, I should have read through the code before posting the above - obviously, the lock owner is a relation.
This also allows for my intended display, great!
Could already have gone into stable, as far as I'm concerned...

eugenmayer’s picture

Status: Needs work » Needs review

Please set it to reviewed when you tested it.

I will happily include this into the next release then

franz’s picture

Just a cosmetic wish: I would prefer the 'is locked' field to display like a node's 'has new content' field - just the word 'locked' in red, or nothing at all. Can this be achieved somehow? (tried to do this with 'rewrite output', but couldn't get the desired result...)

khad, I believe you can do this by theming the output of the field. Not sure exactly how as I haven't done it myself.

brunodbo’s picture

StatusFileSize
new404 bytes

Applied & tested this patch today. Works great.

Attached is an updated version of the patch:

- Removed mismatched parenthesis.
- Minor code style fixes (missing space, new line above function comment)

franz’s picture

Status: Needs review » Reviewed & tested by the community

I thinks this is ready then...

eugenmayer’s picture

Good job, thank you. did not find the time to include this yet, i will do so for the next release

eugenmayer’s picture

Sorry for the huge delay, really was busy with the other modules. Implemented / included in 1.1.

Thank you very much for the contribution

eugenmayer’s picture

Status: Reviewed & tested by the community » Fixed
eugenmayer’s picture

released in 6.2.0 rather then in 1.1. 1.0 will be discontinued

franz’s picture

Status: Fixed » Needs work

Sorry for reopening, but maybe there is a need to document this.

Also, there could be a topic on the project page. =)

franz’s picture

Component: Code » Documentation

ops, fixing component

eugenmayer’s picture

Hey, good idea. As iam not familiar with the implementation, are you willing to write down some lines i include in the docs? We could also start a book page now, as the docs have reached a critical limit :)

Thank you for your effort, really appritiated.

eugenmayer’s picture

Status: Needs work » Fixed

Done :)

franz’s picture

Sorry, kept postponing this for too long... =/

Status: Fixed » Closed (fixed)

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