Macrura Posted May 16, 2020 Author Share Posted May 16, 2020 for (1) I'll need to call getFormatted which is what we do in ProcessDocumentation: $docBody = $docPage->getFormatted($this->body_field); Not sure what #2 is, in terms of a pop-out button; I also see now that this module has a hardcoded fieldname for the help doc body, so that needs to become configurable, as it is in ProcessDocumentation.. My original version did recurse down one level to child pages of the help pages... Link to comment Share on other sites More sharing options...
MarkE Posted May 16, 2020 Share Posted May 16, 2020 2 hours ago, Macrura said: I'll need to call getFormatted which is what we do in ProcessDocumentation That's probably better than what I did which was to render the hanna explicitly. 2 hours ago, Macrura said: Not sure what #2 is, in terms of a pop-out button; So that the user can see the help at the same time, I added a button after the edit pencil in AdminHelpTab.module line 150: $body .= " <span><a href='{$docLink}{$doc->id}' target='_blank' title='Edit'><i class='fa fa-pencil'></i></a></span>"; $body .= " <span><a class='popout-help' href='{$doc->url}' title='Pop-out'><i class='fa fa-external-link'></i></a></span></h1>"; and then the following in AdminHelpTab.js: $(document).on('click', 'a.popout-help', popOut); function popOut(event) { var link = $(this).attr('href'); window.open(link, 'popup', 'resizable= 1, height = 600, width=800, scrollbars=1'); return false; } 2 hours ago, Macrura said: I also see now that this module has a hardcoded fieldname for the help doc body, so that needs to become configurable, as it is in ProcessDocumentation.. That would be good. However, what I would also like to be able to do is to have 2 fields - one with the developer-supplied help and the other which the client can edit to add their own aides-memoire - so I was going to just hack the code for that ? 2 hours ago, Macrura said: My original version did recurse down one level to child pages of the help pages... Correct, but since neither the help-index or help-doc templates allow children, it has no effect. Easy enough to edit the templates though. With the css, my main issue was with .cbp-ntaccordion h3.cbp-nttrigger {} where I changed the font size to 1.2em (from 2.2em). Especially with these changes, I think this is actually quite a powerful help system - if all you want is help - without needing the full ProcessDocumentation (which, in any case does not have the accordion) - though I may want to add a few more things (e.g to produce a complete pdf). Link to comment Share on other sites More sharing options...
MarkE Posted May 17, 2020 Share Posted May 17, 2020 14 hours ago, Macrura said: My original version did recurse down one level to child pages of the help pages... Just a little more re this. The recursion is in two places: In the help tab. There it seemed to have no effect as help-docs could not be children of help-docs. Changing the template family fixed that. In the Help processmodule. There only one level of expansion was catered for. I have put the expansion into a separate function with recursion, increasing the heading level each time. Link to comment Share on other sites More sharing options...
Macrura Posted May 17, 2020 Author Share Posted May 17, 2020 hey thanks - yeah, as you can see from the way the module is setup, it doesn't force you to use the installable fields, so in theory you could just setup any template you want to use for help docs, and any family relations required; and then you just select those in the module config. The default, out-of-the-box behavior is to be only 1 level. As far as i can see in the process module, if any help doc has children, they do get rendered; are you saying you need to go down a 3rd level? Link to comment Share on other sites More sharing options...
MarkE Posted May 17, 2020 Share Posted May 17, 2020 12 minutes ago, Macrura said: are you saying you need to go down a 3rd level Yes. See pic. But I actually did the mod for any number of levels. Each heading is <h{$level> Link to comment Share on other sites More sharing options...
Macrura Posted May 21, 2020 Author Share Posted May 21, 2020 @MarkE cool, i should be able to work on this soon, definitely in June, and will make some improvements according to your suggestions. If you want to post the mods here i can look at them. Link to comment Share on other sites More sharing options...
MarkE Posted May 21, 2020 Share Posted May 21, 2020 Hi @Macrura - you can see my changes here: https://github.com/outflux3/AdminHelp/compare/master...MetaTunes:master I also think it would be a good idea to allow more than superusers to edit - say via a permission. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now