Here's a quick video of these two working in concert for an authenticated user showing the permissions that user has: http://bit.ly/hXlI0Q
The following will allow those with the 'add content to personal books' permission in the book_manager.module to use outline designer 1.3+
This line is changed from
if (arg(0) == 'node' && is_numeric(arg(1)) && arg(2) == 'personal-outline' && is_numeric(arg(3))) {
$form['#redirect'] = 'node/'.arg(3);
}
to:
if (module_exists('outline_child_pages') && arg(0) == 'node' && is_numeric(arg(1)) && arg(2) == 'personal-outline') {
_outline_designer_book_admin_form_alter($form, $form_state, $form_id, 'outline_designer/ocp_ajax/');
}
elseif (arg(0) == 'node' && is_numeric(arg(1)) && arg(2) == 'personal-outline' && is_numeric(arg(3))) {
$form['#redirect'] = 'node/'.arg(3);
}
The outline designer with work for those with access to the 'add content to personal books' permission and that have the outline child pages module enabled (optional outline designer submodule as of 1.3).
I've tested this out on my own setup and it worked (as per the video). I'm pushing out 1.3 by the end of the day (current dev will display it though perm check is missing) but I think this would add massive flexibility to the users of both our modules, especially with the permissions based context menu introduced in 1.3!
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | book_manager.patch | 997 bytes | btopro |
Comments
Comment #1
jgraham commentedbtopro,
This looks interesting, and nice work on the outline designer module. The screencast was quite helpful to get a general overview of the functionality in question.
Can you roll a proper patch against book_manager? That will make reviewing this much more straightforward. If you need help creating a patch the following documentation should prove helpful. http://drupal.org/patch/create
I think I may want to rework it to make it hookable so that other modules will be able to hook in as well without having to rewrite book_manager for each module. I will certainly get something in place to accommodate this as soon as I can.
Comment #2
jgraham commentedComment #3
btopro commentedSounds good, wasn't sure if you were on git or cvs (or if that mattered for patches). I'm still on cvs, if there's no difference ill put it out tonight or tomorrow
Comment #4
jgraham commentedNo preference here, it should apply regardless of the tool.
I just prefer a patch as its easier to track down the exact lines in question without ambiguity and gives me a better context for when I get the time to merge this in. Hopefully sooner rather than later.
Comment #5
btopro commentedmakes sense, it's on my list of things to do first thing in the morning.
Comment #6
btopro commentedHere you go, hope this applies cleanly
Comment #7
jason.fisher commentedPatch applied successfully against 6.x-2.x-dev for me. Will trial the functionality this week as I work out group admins and books per group.
Comment #8
btopro commentedLet me know if you have any questions as there is a OG helper module in outline designer to allow group admins / books per group to be displayed and worked on. it's the outline_designer_og submodule that comes with 1.3.
Comment #9
jvieille commentedan we get this patch committed?
Thanks