Jump to content

Module: AdminHelp


Macrura
 Share

Recommended Posts

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

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

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:

  1.  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.
  2. 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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...